summaryrefslogtreecommitdiff
path: root/addons/stock_landed_costs/views/account_move_views.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/stock_landed_costs/views/account_move_views.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/stock_landed_costs/views/account_move_views.xml')
-rw-r--r--addons/stock_landed_costs/views/account_move_views.xml34
1 files changed, 34 insertions, 0 deletions
diff --git a/addons/stock_landed_costs/views/account_move_views.xml b/addons/stock_landed_costs/views/account_move_views.xml
new file mode 100644
index 00000000..dd2ae77b
--- /dev/null
+++ b/addons/stock_landed_costs/views/account_move_views.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="account_view_move_form_inherited" model="ir.ui.view">
+ <field name="name">account.view.move.form.inherited</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account.view_move_form"/>
+ <field name="groups_id" eval="[(4,ref('stock.group_stock_manager'))]"/>
+ <field name="arch" type="xml">
+ <xpath expr="//div[@name='button_box']" position="inside">
+ <field name="landed_costs_ids" invisible="1"/>
+ <button string="Landed Costs" type="object"
+ name="action_view_landed_costs"
+ class="oe_stat_button" icon="fa-plus-square" groups="stock.group_stock_manager"
+ attrs="{'invisible': [('landed_costs_ids', '=', [])]}" />
+ </xpath>
+
+ <field name="state" position="before">
+ <field name="landed_costs_visible" invisible="1"/>
+ <button name="button_create_landed_costs" class="oe_highlight" string="Create Landed Costs" type="object" groups="account.group_account_invoice" attrs="{'invisible': [('landed_costs_visible', '!=', True)]}"/>
+ </field>
+
+ <xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='name']" position="after">
+ <field name="product_type" invisible="1"/>
+ <field name="is_landed_costs_line" string="Landed Costs" attrs="{'readonly': [('product_type', '!=', 'service')], 'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}" optional="show"/>
+ </xpath>
+
+ <xpath expr="//field[@name='line_ids']/tree/field[@name='name']" position="after">
+ <field name="product_type" invisible="1"/>
+ <field name="is_landed_costs_line" invisible="1"/>
+ </xpath>
+ </field>
+ </record>
+
+</odoo>