-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] sustainability_purchase: Fix format
- Loading branch information
1 parent
6afd617
commit 3d83b08
Showing
1 changed file
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<odoo> | ||
<data> | ||
<record id="sustainability_product_supplierinfo_tree_view" model="ir.ui.view"> | ||
<field name="name"> | ||
sustainability.product.supplierinfo.tree.view | ||
</field> | ||
<field name="model"> | ||
product.supplierinfo | ||
</field> | ||
<field name="inherit_id" ref="purchase.product_supplierinfo_tree_view2" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//tree" position="inside"> | ||
<field column_invisible="1" name="carbon_allowed_factor_ids" /> | ||
<field | ||
<data> | ||
<record id="product_supplierinfo_form_view" model="ir.ui.view"> | ||
<field name="name">product_supplierinfo_form_view</field> | ||
<field name="model">product.supplierinfo</field> | ||
<field name="inherit_id" ref="product.product_supplierinfo_form_view" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//group[@name='vendor']" position="after"> | ||
<group string="CO2 Settings" name="group_carbon_settings"> | ||
<field name="carbon_allowed_factor_ids" invisible="1" /> | ||
<group string="Purchases"> | ||
<label for="carbon_in_is_manual" string="Mode" /> | ||
<div class="gap-1 d-inline-flex ml-3"> | ||
<div | ||
class="opacity-50 mr-2" | ||
invisible="not carbon_in_is_manual" | ||
>Undefined</div> | ||
<div | ||
style="font-weight: bold;" | ||
invisible="carbon_in_is_manual" | ||
>Undefined</div> | ||
|
||
<field | ||
name="carbon_in_is_manual" | ||
nolabel="1" | ||
widget="boolean_toggle" | ||
class="" | ||
style="margin-left: 8px;" | ||
/> | ||
<field name="carbon_in_mode" invisible="1" /> | ||
|
||
<div | ||
class="opacity-50" | ||
invisible="carbon_in_is_manual" | ||
>Set</div> | ||
<div | ||
style="font-weight: bold;" | ||
invisible="not carbon_in_is_manual" | ||
>Set</div> | ||
</div> | ||
<field | ||
name="carbon_in_fallback_reference" | ||
widget="reference" | ||
invisible="carbon_in_is_manual" | ||
/> | ||
<field | ||
name="carbon_in_factor_id" | ||
string="Emission Factor" | ||
invisible="not carbon_in_is_manual" | ||
required="carbon_in_is_manual" | ||
/> | ||
</group> | ||
</group> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
<record id="sustainability_product_supplierinfo_tree_view" model="ir.ui.view"> | ||
<field name="name">sustainability.product.supplierinfo.tree.view</field> | ||
<field name="model">product.supplierinfo</field> | ||
<field name="inherit_id" ref="purchase.product_supplierinfo_tree_view2" /> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//tree" position="inside"> | ||
<field column_invisible="1" name="carbon_allowed_factor_ids" /> | ||
<field | ||
name="carbon_in_factor_id" | ||
string="Emission Factor" | ||
optional="show" | ||
widget="many2one" | ||
/> | ||
</xpath> | ||
</field> | ||
</record> | ||
</data> | ||
</xpath> | ||
</field> | ||
</record> | ||
|
||
</data> | ||
</odoo> |