account_move_views.xml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="account_view_move_form_inherited" model="ir.ui.view">
  4. <field name="name">account.view.move.form.inherited</field>
  5. <field name="model">account.move</field>
  6. <field name="inherit_id" ref="account.view_move_form"/>
  7. <field name="arch" type="xml">
  8. <xpath expr="//div[@name='button_box']" position="inside">
  9. <t groups="stock.group_stock_manager">
  10. <field name="landed_costs_ids" invisible="1"/>
  11. <button string="Landed Costs" type="object"
  12. name="action_view_landed_costs"
  13. class="oe_stat_button" icon="fa-plus-square"
  14. attrs="{'invisible': [('landed_costs_ids', '=', [])]}"/>
  15. </t>
  16. </xpath>
  17. <field name="state" position="before">
  18. <t groups="stock.group_stock_manager">
  19. <field name="landed_costs_visible" invisible="1" />
  20. <button name="button_create_landed_costs" class="oe_highlight" string="Create Landed Costs" data-hotkey="l" type="object" groups="account.group_account_invoice" attrs="{'invisible': [('landed_costs_visible', '!=', True)]}"/>
  21. </t>
  22. </field>
  23. <xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='name']" position="after">
  24. <field name="product_type" invisible="1" groups="stock.group_stock_manager"/>
  25. <field name="is_landed_costs_line" string="Landed Costs" attrs="{'readonly': [('product_type', '!=', 'service')], 'column_invisible': [('parent.move_type', '!=', 'in_invoice')]}" optional="show" groups="stock.group_stock_manager"/>
  26. </xpath>
  27. <xpath expr="//field[@name='line_ids']/tree/field[@name='name']" position="after">
  28. <field name="product_type" invisible="1" groups="stock.group_stock_manager"/>
  29. <field name="is_landed_costs_line" invisible="1" groups="stock.group_stock_manager"/>
  30. </xpath>
  31. </field>
  32. </record>
  33. </odoo>