lunch_supplier_views.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="lunch_supplier_view_tree" model="ir.ui.view">
  4. <field name="name">lunch.supplier.view.tree</field>
  5. <field name="model">lunch.supplier</field>
  6. <field name="arch" type="xml">
  7. <tree>
  8. <field name="name"/>
  9. <field name="phone" class="o_force_ltr"/>
  10. <field name="email"/>
  11. </tree>
  12. </field>
  13. </record>
  14. <record id="lunch_supplier_view_form" model="ir.ui.view">
  15. <field name="name">lunch.supplier.view.form</field>
  16. <field name="model">lunch.supplier</field>
  17. <field name="arch" type="xml">
  18. <form>
  19. <sheet>
  20. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  21. <div class="oe_title">
  22. <label for="name" string="Vendor"/>
  23. <h1><field name="name" required="1" placeholder="e.g. The Pizzeria Inn"/></h1>
  24. </div>
  25. <group>
  26. <group>
  27. <field name="partner_id" context="{'default_is_company': True, 'default_city': city, 'default_name': name, 'default_street': street, 'default_street2': street2, 'default_state_id': state_id, 'default_zip': zip_code, 'default_country_id': country_id, 'default_phone': phone}"/>
  28. <label for="street" string="Address"/>
  29. <div class="o_address_format">
  30. <field name="street" placeholder="Street..." class="o_address_street"/>
  31. <field name="street2" placeholder="Street 2..." class="o_address_street"/>
  32. <field name="city" placeholder="City" class="o_address_city"/>
  33. <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True}" context="{'country_id': country_id, 'zip': zip_code}"/>
  34. <field name="zip_code" placeholder="ZIP" class="o_address_zip"/>
  35. <field name="country_id" placeholder="Country" class="o_address_country" options="{'no_open': True, 'no_create': True}"/>
  36. </div>
  37. </group>
  38. <group>
  39. <field name="active" invisible="1"/>
  40. <field name="email" attrs="{'required': [('send_by', '=', 'mail')]}"/>
  41. <field name="phone" class="o_force_ltr" attrs="{'required': [('send_by', '=', 'phone')]}"/>
  42. <field name="company_id" groups="base.group_multi_company"/>
  43. <field name="responsible_id" attrs="{'required': [('send_by', '=', 'mail')]}" groups="base.group_no_one" domain="[('share', '=', False)]"/>
  44. </group>
  45. </group>
  46. <group>
  47. <group string="Availability">
  48. <field name="tz" groups="base.group_no_one"/>
  49. <label for="sun" class="d-none"/>
  50. <field name="sun" invisible="1"/>
  51. <widget name="week_days"/>
  52. <field name="recurrency_end_date" groups="base.group_no_one"/>
  53. </group>
  54. <group string="Orders">
  55. <field name="delivery"/>
  56. <field name="available_location_ids" widget="many2many_tags"/>
  57. <field name="send_by" widget="radio"/>
  58. <label for="automatic_email_time" attrs="{'invisible': [('send_by', '!=', 'mail')]}"/>
  59. <div class="o_row" attrs="{'invisible': [('send_by', '!=', 'mail')]}"><field name="automatic_email_time" widget="float_time"/> <field name="moment"/></div>
  60. </group>
  61. </group>
  62. <group>
  63. <group>
  64. <field name="active" invisible="1"/>
  65. <field name="topping_label_1"/>
  66. <field name="topping_quantity_1" class="w-50"/>
  67. </group>
  68. <div>
  69. <field name="topping_ids_1" nolabel="1">
  70. <tree editable="bottom">
  71. <field name="name"/>
  72. <field name="company_id" invisible="1"/>
  73. <field name="currency_id" invisible="1"/>
  74. <field name="price" widget="monetary"/>
  75. </tree>
  76. </field>
  77. </div>
  78. <group>
  79. <field name="topping_label_2"/>
  80. <field name="topping_quantity_2" class="w-50"/>
  81. </group>
  82. <div>
  83. <field name="topping_ids_2" nolabel="1">
  84. <tree editable="bottom">
  85. <field name="name"/>
  86. <field name="company_id" invisible="1"/>
  87. <field name="currency_id" invisible="1"/>
  88. <field name="price" widget="monetary"/>
  89. </tree>
  90. </field>
  91. </div>
  92. <group>
  93. <field name="topping_label_3"/>
  94. <field name="topping_quantity_3" class="w-50"/>
  95. </group>
  96. <div>
  97. <field name="topping_ids_3" nolabel="1">
  98. <tree editable="bottom">
  99. <field name="name"/>
  100. <field name="company_id" invisible="1"/>
  101. <field name="currency_id" invisible="1"/>
  102. <field name="price" widget="monetary"/>
  103. </tree>
  104. </field>
  105. </div>
  106. </group>
  107. </sheet>
  108. <div class="oe_chatter">
  109. <field name="message_follower_ids" groups="base.group_user"/>
  110. <field name="activity_ids"/>
  111. <field name="message_ids"/>
  112. </div>
  113. </form>
  114. </field>
  115. </record>
  116. <record id="lunch_supplier_view_kanban" model="ir.ui.view">
  117. <field name="name">lunch.supplier.view.kanban</field>
  118. <field name="model">lunch.supplier</field>
  119. <field name="arch" type="xml">
  120. <kanban>
  121. <field name="partner_id"/>
  122. <field name="city"/>
  123. <field name="country_id"/>
  124. <field name="email"/>
  125. <templates>
  126. <t t-name="kanban-box">
  127. <div class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban">
  128. <div class="oe_kanban_details">
  129. <strong class="o_kanban_record_title oe_partner_heading"><field name="display_name"/></strong>
  130. <ul>
  131. <li t-if="record.city.raw_value and !record.country_id.raw_value"><field name="city"/></li>
  132. <li t-if="!record.city.raw_value and record.country_id.raw_value"><field name="country_id"/></li>
  133. <li t-if="record.city.raw_value and record.country_id.raw_value"><field name="city"/>, <field name="country_id"/></li>
  134. <li t-if="record.email.raw_value" class="o_text_overflow"><field name="email"/></li>
  135. </ul>
  136. </div>
  137. </div>
  138. </t>
  139. </templates>
  140. </kanban>
  141. </field>
  142. </record>
  143. <record id="lunch_supplier_view_search" model="ir.ui.view">
  144. <field name="name">lunch.supplier.view.search</field>
  145. <field name="model">lunch.supplier</field>
  146. <field name="arch" type="xml">
  147. <search>
  148. <field name="name"/>
  149. <separator/>
  150. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  151. </search>
  152. </field>
  153. </record>
  154. <record id="lunch_vendors_action" model="ir.actions.act_window">
  155. <field name="name">Vendors</field>
  156. <field name="res_model">lunch.supplier</field>
  157. <field name="view_mode">kanban,tree,form</field>
  158. <field name="search_view_id" ref="lunch_supplier_view_search"/>
  159. </record>
  160. </odoo>