partner_view.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="view_account_position_form" model="ir.ui.view">
  5. <field name="name">account.fiscal.position.form</field>
  6. <field name="model">account.fiscal.position</field>
  7. <field name="arch" type="xml">
  8. <form string="Fiscal Position">
  9. <div groups="account.group_account_manager"
  10. class="alert alert-info mb-0"
  11. role="alert"
  12. attrs="{'invisible': [('foreign_vat_header_mode', '=', False)]}">
  13. <div attrs="{'invisible': [('foreign_vat_header_mode', '!=', 'templates_found')]}">
  14. Click
  15. <button
  16. string="here"
  17. type="object"
  18. name="action_create_foreign_taxes"
  19. class="oe_link"
  20. style="padding: 0; vertical-align: baseline;"/>
  21. to create the taxes for this country.
  22. </div>
  23. <span attrs="{'invisible': [('foreign_vat_header_mode', '!=', 'no_template')]}">
  24. No tax template found for this country. Please install the corresponding localization module.
  25. <button
  26. string="Install new module"
  27. type="action"
  28. name="account.open_account_charts_modules"
  29. class="oe_link"
  30. groups="base.group_system"
  31. style="padding: 0; vertical-align: baseline;"/>
  32. </span>
  33. </div>
  34. <sheet>
  35. <div class="oe_button_box" name="button_box"/>
  36. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  37. <group>
  38. <group>
  39. <field name="active" invisible="1"/>
  40. <field name="company_id" invisible="1"/>
  41. <field name="states_count" invisible="1"/>
  42. <field name="company_country_id" invisible="1"/>
  43. <field name="foreign_vat_header_mode" invisible="1"/>
  44. <field name="name"/>
  45. <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
  46. </group>
  47. <group>
  48. <field name="auto_apply"/>
  49. <field name="vat_required" attrs="{'invisible': [('auto_apply', '!=', True)]}"/>
  50. <field name="foreign_vat"/>
  51. <field name="country_group_id" attrs="{'invisible': [('auto_apply', '!=', True)]}"/>
  52. <field name="country_id"
  53. attrs="{'required': [('foreign_vat', '!=', False)]}"
  54. options="{'no_open': True, 'no_create': True}"/>
  55. <field name="state_ids" widget="many2many_tags" domain="[('country_id', '=', country_id)]"
  56. attrs="{'invisible': ['|', '|', '&amp;', ('auto_apply', '!=', True), ('foreign_vat', '=', False), ('country_id', '=', False), ('states_count', '=', 0)]}"/>
  57. <label for="zip_from" string="Zip Range"
  58. attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}"/>
  59. <div attrs="{'invisible': ['|', ('auto_apply', '!=', True), ('country_id', '=', False)]}">
  60. <span> From </span>
  61. <field name="zip_from" class="oe_inline"/>
  62. <div class="oe_edit_only"/>
  63. <span> To </span>
  64. <field name="zip_to" class="oe_inline"/>
  65. </div>
  66. </group>
  67. </group>
  68. <notebook>
  69. <page name="tax_mapping" string="Tax Mapping">
  70. <field name="tax_ids" widget="one2many" nolabel="1" context="{'append_type_to_tax_name': True}">
  71. <tree name="tax_map_tree" string="Tax Mapping" editable="bottom" no_open="1">
  72. <field name="tax_src_id"
  73. domain="[
  74. ('type_tax_use', '!=', 'none'),
  75. ('country_id', '=', parent.company_country_id),
  76. '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)
  77. ]"
  78. context="{'append_type_to_tax_name': True}"
  79. />
  80. <field name="tax_dest_id"
  81. domain="[
  82. ('type_tax_use', '!=', 'none'),
  83. ('country_id', '=', parent.country_id if parent.foreign_vat else parent.company_country_id),
  84. '|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"
  85. context="{'append_type_to_tax_name': True}"
  86. />
  87. </tree>
  88. <form name="tax_map_form" string="Tax Mapping">
  89. <group>
  90. <field name="tax_src_id" domain="[('type_tax_use', '!=', 'none')]" context="{'append_type_to_tax_name': True}"/>
  91. <field name="tax_dest_id" domain="[('type_tax_use', '!=', 'none')]" context="{'append_type_to_tax_name': True}"/>
  92. </group>
  93. </form>
  94. </field>
  95. </page>
  96. <page name="account_mapping" string="Account Mapping" groups="account.group_account_readonly">
  97. <field name="account_ids" widget="one2many" nolabel="1">
  98. <tree string="Account Mapping" editable="bottom">
  99. <field name="account_src_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
  100. <field name="account_dest_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
  101. </tree>
  102. <form string="Account Mapping">
  103. <field name="account_src_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
  104. <field name="account_dest_id" domain="['|', ('company_id', '=', False), ('company_id', '=', parent.company_id)]"/>
  105. </form>
  106. </field>
  107. </page>
  108. </notebook>
  109. <field name="note" class="oe-bordered-editor" placeholder="Legal Notes..."/>
  110. </sheet>
  111. </form>
  112. </field>
  113. </record>
  114. <record id="view_account_position_filter" model="ir.ui.view">
  115. <field name="name">account.fiscal.position.filter</field>
  116. <field name="model">account.fiscal.position</field>
  117. <field name="arch" type="xml">
  118. <search string="Search Fiscal Positions">
  119. <field name="name" string="Fiscal Position"/>
  120. <filter name="active" string="Archived" domain="[('active', '=', False)]"/>
  121. </search>
  122. </field>
  123. </record>
  124. <record id="view_account_position_tree" model="ir.ui.view">
  125. <field name="name">account.fiscal.position.tree</field>
  126. <field name="model">account.fiscal.position</field>
  127. <field name="arch" type="xml">
  128. <tree string="Fiscal Position">
  129. <field name="sequence" widget="handle"/>
  130. <field name="name"/>
  131. <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
  132. </tree>
  133. </field>
  134. </record>
  135. <record model="ir.ui.view" id="partner_view_buttons">
  136. <field name="name">partner.view.buttons</field>
  137. <field name="model">res.partner</field>
  138. <field name="inherit_id" ref="base.view_partner_form" />
  139. <field name="priority" eval="11"/>
  140. <field name="arch" type="xml">
  141. <div name="button_box" position="inside">
  142. <button type="object" class="oe_stat_button" icon="fa-pencil-square-o" name="action_view_partner_invoices"
  143. groups="account.group_account_invoice,account.group_account_readonly"
  144. context="{'default_partner_id': active_id}">
  145. <div class="o_form_field o_stat_info">
  146. <span class="o_stat_value">
  147. <field name="currency_id" invisible="1"/>
  148. <field name="total_invoiced" widget='monetary' options="{'currency_field': 'currency_id'}"/>
  149. </span>
  150. <span class="o_stat_text">Invoiced</span>
  151. </div>
  152. </button>
  153. </div>
  154. <page name="internal_notes" position="inside">
  155. <group groups="account.group_account_invoice,account.group_account_readonly">
  156. <group groups="account.group_warning_account" col="2">
  157. <separator string="Warning on the Invoice" colspan="2"/>
  158. <field name="invoice_warn" nolabel="1" colspan="2" required="1"/>
  159. <field name="invoice_warn_msg" placeholder="Type a message..." colspan="2" nolabel="1"
  160. attrs="{'required':[('invoice_warn','!=', False), ('invoice_warn','!=','no-message')], 'invisible':[('invoice_warn','in',(False,'no-message'))]}"/>
  161. </group>
  162. </group>
  163. </page>
  164. </field>
  165. </record>
  166. <record id="action_account_fiscal_position_form" model="ir.actions.act_window">
  167. <field name="name">Fiscal Positions</field>
  168. <field name="res_model">account.fiscal.position</field>
  169. <field name="view_mode">tree,kanban,form</field>
  170. <field name="search_view_id" ref="view_account_position_filter"/>
  171. <field name="help" type="html">
  172. <p class="o_view_nocontent_smiling_face">
  173. Create a new fiscal position
  174. </p>
  175. </field>
  176. </record>
  177. <!--
  178. Partners Extension
  179. -->
  180. <record id="view_partner_property_form" model="ir.ui.view">
  181. <field name="name">res.partner.property.form.inherit</field>
  182. <field name="model">res.partner</field>
  183. <field name="priority">2</field>
  184. <field name="inherit_id" ref="base.view_partner_form"/>
  185. <field name="arch" type="xml">
  186. <xpath expr="//sheet" position="before">
  187. <div groups="account.group_account_invoice,account.group_account_readonly" class="alert alert-warning" role="alert" style="margin-bottom:0px;"
  188. attrs="{'invisible': [('duplicated_bank_account_partners_count', '=', 0)]}">
  189. One or more Bank Accounts set on this partner are also used by other <bold><button class="alert-link" type="object" name="action_view_partner_with_same_bank" role="button" string="Partners" style="padding: 0;vertical-align: baseline;"/></bold>. Please make sure that this is a wanted behavior.
  190. </div>
  191. </xpath>
  192. <page name="sales_purchases" position="after">
  193. <page string="Invoicing" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice,account.group_account_readonly">
  194. <field name="duplicated_bank_account_partners_count" invisible="1"/>
  195. <field name="show_credit_limit" invisible="1"/>
  196. <group>
  197. <group string="Bank Accounts" name="banks" groups="account.group_account_invoice,account.group_account_readonly">
  198. <field name="bank_ids" nolabel="1" colspan="2" context="{'default_allow_out_payment': True}">
  199. <tree editable="bottom">
  200. <field name="sequence" widget="handle"/>
  201. <field name="bank_id"/>
  202. <field name="acc_number"/>
  203. <field name="allow_out_payment" widget="boolean_toggle"/>
  204. <field name="acc_holder_name" invisible="1"/>
  205. </tree>
  206. </field>
  207. <button type="action" class="btn-link"
  208. name="%(base.action_res_partner_bank_account_form)d"
  209. context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
  210. string="View accounts detail"
  211. colspan="2"
  212. />
  213. </group>
  214. <group string="Accounting Entries" name="accounting_entries" groups="account.group_account_readonly">
  215. <field name="currency_id" invisible="1"/>
  216. <field name="property_account_receivable_id"/>
  217. <field name="property_account_payable_id"/>
  218. </group>
  219. <group string="Credit Limits"
  220. name="credit_limits"
  221. groups="account.group_account_invoice,account.group_account_readonly"
  222. attrs="{'invisible': [('show_credit_limit', '=', False)]}">
  223. <field name="credit"/>
  224. <label for="use_partner_credit_limit"/>
  225. <div class="o_row">
  226. <field name="use_partner_credit_limit"/>
  227. <field name="credit_limit" class="oe_inline" attrs="{'invisible': [('use_partner_credit_limit', '=', False)]}"/>
  228. </div>
  229. </group>
  230. </group>
  231. </page>
  232. <page string="Invoicing" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}" groups="account.group_account_invoice,account.group_account_readonly">
  233. <div>
  234. <p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
  235. </div>
  236. </page>
  237. </page>
  238. <xpath expr="//group[@name='misc']" position="before">
  239. <group string="Fiscal Information" name="fiscal_information" priority="5" groups="account.group_account_invoice,account.group_account_readonly">
  240. <field name="property_account_position_id" options="{'no_create': True, 'no_open': True}"/>
  241. </group>
  242. </xpath>
  243. <group name="sale" position="inside">
  244. <field string="Payment Terms" name="property_payment_term_id" options="{'no_open': True, 'no_create': True}" groups="account.group_account_invoice,account.group_account_readonly"/>
  245. </group>
  246. <group name="purchase" position="inside">
  247. <field string="Payment Terms" name="property_supplier_payment_term_id" options="{'no_open': True, 'no_create': True}" groups="account.group_account_invoice,account.group_account_readonly"/>
  248. </group>
  249. </field>
  250. </record>
  251. <record id="res_partner_view_search" model="ir.ui.view">
  252. <field name="name">res.partner.search.inherit</field>
  253. <field name="model">res.partner</field>
  254. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  255. <field name="arch" type="xml">
  256. <xpath expr="//filter[@name='inactive']" position="before">
  257. <filter string="Customer Invoices" name="customer" domain="[('customer_rank','>', 0)]"/>
  258. <filter string="Vendor Bills" name="supplier" domain="[('supplier_rank','>', 0)]"/>
  259. <separator/>
  260. </xpath>
  261. </field>
  262. </record>
  263. <record id="res_partner_action_customer" model="ir.actions.act_window">
  264. <field name="name">Customers</field>
  265. <field name="type">ir.actions.act_window</field>
  266. <field name="res_model">res.partner</field>
  267. <field name="view_mode">kanban,tree,form</field>
  268. <field name="context">{'search_default_customer': 1,'res_partner_search_mode': 'customer', 'default_is_company': True, 'default_customer_rank': 1}</field>
  269. <field name="help" type="html">
  270. <p class="o_view_nocontent_smiling_face">
  271. Create a new customer in your address book
  272. </p><p>
  273. Odoo helps you easily track all activities related to a customer.
  274. </p>
  275. </field>
  276. </record>
  277. <record id="res_partner_action_supplier" model="ir.actions.act_window">
  278. <field name="name">Vendors</field>
  279. <field name="type">ir.actions.act_window</field>
  280. <field name="res_model">res.partner</field>
  281. <field name="view_mode">kanban,tree,form</field>
  282. <field name="context">{'search_default_supplier': 1,'res_partner_search_mode': 'supplier', 'default_is_company': True, 'default_supplier_rank': 1}</field>
  283. <field name="help" type="html">
  284. <p class="o_view_nocontent_smiling_face">
  285. Create a new supplier in your address book
  286. </p><p>
  287. Odoo helps you easily track all activities related to a supplier.
  288. </p>
  289. </field>
  290. </record>
  291. </data>
  292. </odoo>