res_partner_views.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_partner_property_form" model="ir.ui.view">
  4. <field name="name">res.partner.purchase.property.form.inherit</field>
  5. <field name="model">res.partner</field>
  6. <field name="inherit_id" ref="base.view_partner_form"/>
  7. <field name="priority">36</field>
  8. <field name="arch" type="xml">
  9. <group name="purchase" position="inside">
  10. <div name="receipt_reminder" colspan="2" class="o_checkbox_optional_field" groups='purchase.group_send_reminder'>
  11. <label for="receipt_reminder_email"/>
  12. <field name="receipt_reminder_email"/>
  13. <div attrs="{'invisible': [('receipt_reminder_email', '=', False)]}">
  14. <field name="reminder_date_before_receipt" class="oe_inline"/>
  15. <span> day(s) before</span>
  16. </div>
  17. </div>
  18. <field name="property_purchase_currency_id" options="{'no_create': True, 'no_open': True}" groups='base.group_multi_currency'/>
  19. </group>
  20. </field>
  21. </record>
  22. <record id="act_res_partner_2_purchase_order" model="ir.actions.act_window">
  23. <field name="name">RFQs and Purchases</field>
  24. <field name="res_model">purchase.order</field>
  25. <field name="view_mode">tree,kanban,form,graph</field>
  26. <field name="view_ids" eval="[(5, 0, 0),
  27. (0, 0, {'view_mode': 'tree', 'view_id': ref('purchase.purchase_order_tree')}),
  28. (0, 0, {'view_mode': 'kanban', 'view_id': ref('purchase.purchase_order_view_kanban_without_dashboard')}),
  29. ]"/>
  30. <field name="context">{'search_default_partner_id': active_id, 'default_partner_id': active_id}</field>
  31. <field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
  32. <field name="help" type="html">
  33. <p class="o_view_nocontent_smiling_face">
  34. This vendor has no purchase order. Create a new RfQ
  35. </p><p>
  36. The request for quotation is the first step of the purchases flow. Once
  37. converted into a purchase order, you will be able to control the receipt
  38. of the products and the vendor bill.
  39. </p>
  40. </field>
  41. </record>
  42. <!-- Partner kanban view inherited -->
  43. <record model="ir.ui.view" id="purchase_partner_kanban_view">
  44. <field name="name">res.partner.kanban.purchaseorder.inherit</field>
  45. <field name="model">res.partner</field>
  46. <field name="inherit_id" ref="base.res_partner_kanban_view"/>
  47. <field name="arch" type="xml">
  48. <field name="mobile" position="after">
  49. <field name="purchase_order_count" groups="purchase.group_purchase_user"/>
  50. </field>
  51. <xpath expr="//div[hasclass('oe_kanban_bottom_left')]" position="inside">
  52. <a t-if="record.purchase_order_count.value>0" data-type="action" data-name="%(purchase.act_res_partner_2_purchase_order)d"
  53. groups="purchase.group_purchase_user"
  54. href="#" class="oe_kanban_action oe_kanban_action_a me-1">
  55. <span class="badge rounded-pill">
  56. <i class="fa fa-fw fa-credit-card" role="img" aria-label="Purchases" title="Purchases"/>
  57. <t t-out="record.purchase_order_count.value"/>
  58. </span>
  59. </a>
  60. </xpath>
  61. </field>
  62. </record>
  63. <record id="act_res_partner_2_supplier_invoices" model="ir.actions.act_window">
  64. <field name="name">Vendor Bills</field>
  65. <field name="res_model">account.move</field>
  66. <field name="view_mode">tree,form,graph</field>
  67. <field name="domain">[('move_type','in',('in_invoice', 'in_refund'))]</field>
  68. <field name="context">{'search_default_partner_id': active_id, 'default_move_type': 'in_invoice', 'default_partner_id': active_id}</field>
  69. <field name="help" type="html">
  70. <p class="o_view_nocontent_smiling_face">
  71. Record a new vendor bill
  72. </p><p>
  73. Vendors bills can be pre-generated based on purchase
  74. orders or receipts. This allows you to control bills
  75. you receive from your vendor according to the draft
  76. document in Odoo.
  77. </p>
  78. </field>
  79. </record>
  80. <record id="res_partner_view_purchase_buttons" model="ir.ui.view">
  81. <field name="name">res.partner.view.purchase.buttons</field>
  82. <field name="model">res.partner</field>
  83. <field name="inherit_id" ref="base.view_partner_form" />
  84. <field name="priority" eval="9"/>
  85. <field name="arch" type="xml">
  86. <div name="button_box" position="inside">
  87. <button class="oe_stat_button" name="%(purchase.act_res_partner_2_purchase_order)d" type="action"
  88. groups="purchase.group_purchase_user"
  89. icon="fa-credit-card">
  90. <field string="Purchases" name="purchase_order_count" widget="statinfo"/>
  91. </button>
  92. </div>
  93. <page name="internal_notes" position="inside">
  94. <group groups="purchase.group_purchase_user">
  95. <group groups="purchase.group_warning_purchase" col="2">
  96. <separator string="Warning on the Purchase Order" colspan="2"/>
  97. <field name="purchase_warn" nolabel="1" colspan="2" required="1"/>
  98. <field name="purchase_warn_msg" colspan="2" placeholder="Type a message..." nolabel="1"
  99. attrs="{'required':[('purchase_warn','!=', False), ('purchase_warn','!=','no-message')], 'invisible':[('purchase_warn','in',(False,'no-message'))]}"/>
  100. </group>
  101. </group>
  102. </page>
  103. </field>
  104. </record>
  105. <record id="res_partner_view_purchase_account_buttons" model="ir.ui.view">
  106. <field name="name">res.partner.view.purchase.account.buttons</field>
  107. <field name="model">res.partner</field>
  108. <field name="inherit_id" ref="base.view_partner_form" />
  109. <field name="priority" eval="12"/>
  110. <field name="arch" type="xml">
  111. <div name="button_box" position="inside">
  112. <button class="oe_stat_button" name="%(purchase.act_res_partner_2_supplier_invoices)d" type="action"
  113. groups="account.group_account_invoice"
  114. icon="fa-pencil-square-o" help="Vendor Bills">
  115. <field string="Vendor Bills" name="supplier_invoice_count" widget="statinfo"/>
  116. </button>
  117. </div>
  118. </field>
  119. </record>
  120. </odoo>