You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright (C) 2019-Today GRAP (http://www.grap.coop)
  4. @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. -->
  7. <odoo>
  8. <record id="view_pos_move_reason_tree" model="ir.ui.view">
  9. <field name="model">pos.move.reason</field>
  10. <field name="arch" type="xml">
  11. <tree colors="gray:active == False;">
  12. <field name="name"/>
  13. <field name="journal_ids" widget="many2many_tags"/>
  14. <field name="income_account_id"/>
  15. <field name="expense_account_id"/>
  16. <field name="company_id" groups="base.group_multi_company"/>
  17. <field name="active" invisible="1"/>
  18. </tree>
  19. </field>
  20. </record>
  21. <record id="view_pos_move_reason_form" model="ir.ui.view">
  22. <field name="model">pos.move.reason</field>
  23. <field name="arch" type="xml">
  24. <form>
  25. <sheet>
  26. <div class="oe_title oe_left">
  27. <div class="oe_edit_only">
  28. <label for="name"/>
  29. </div>
  30. <h1>
  31. <field name="name" default_focus="1" placeholder="Name"/>
  32. </h1>
  33. </div>
  34. <div class="oe_right oe_button_box" name="buttons" />
  35. <group col="4" name="description">
  36. <field name="company_id" groups="base.group_multi_company"/>
  37. <field name="active"/>
  38. <field name="journal_ids" widget="many2many_tags"/>
  39. </group>
  40. <group col="4">
  41. <field name="is_income_reason"/>
  42. <field name="income_account_id" attrs="{
  43. 'required': [('is_income_reason', '=', True)],
  44. 'invisible': [('is_income_reason', '=', False)]}"/>
  45. <field name="is_expense_reason"/>
  46. <field name="expense_account_id" attrs="{
  47. 'required': [('is_expense_reason', '=', True)],
  48. 'invisible': [('is_expense_reason', '=', False)]}"/>
  49. </group>
  50. </sheet>
  51. </form>
  52. </field>
  53. </record>
  54. <record id="action_pos_move_reason" model="ir.actions.act_window">
  55. <field name="name">Move Reasons</field>
  56. <field name="type">ir.actions.act_window</field>
  57. <field name="res_model">pos.move.reason</field>
  58. <field name="view_type">form</field>
  59. <field name="view_mode">tree,form</field>
  60. </record>
  61. <menuitem id="menu_pos_move_reason"
  62. parent="point_of_sale.menu_point_config_product"
  63. action="action_pos_move_reason"
  64. sequence="50"/>
  65. </odoo>