Files
project-tools/project_link_from_invoice/views/account_move_view.xml
clementthomas cd663ec6e5 [ADD] project_link_from_invoice: first commit
new module to easily access to project from invoices
2023-04-27 14:59:28 +02:00

32 lines
1.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_move_form_project_link_from_invoice_inherit" model="ir.ui.view">
<field name="name">account.move.form.project.link</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="priority" eval="99" />
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button name="action_open_projects"
string="Project(s)" class="oe_highlight" type="object" icon="fa-puzzle-piece"
invisible="[]" attrs="{'invisible': [('project_count', '=', 0)]}" />
</xpath>
<xpath expr="//header" position="after">
<field name="project_count" invisible="1" />
</xpath>
</field>
</record>
<record id="view_invoice_tree_project_link_from_invoice_inherit" model="ir.ui.view">
<field name="name">account.invoice.tree.project.link</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_invoice_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree/field[@name='invoice_date']" position="before">
<field name="projects_name" />
</xpath>
</field>
</record>
</odoo>