| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<record id="account_invoice_groupby_inherit" model="ir.ui.view"> |
| 5 |
<field name="name">account.move.groupby</field> |
| 6 |
<field name="model">account.move</field> |
| 7 |
<field name="inherit_id" ref="account.view_account_invoice_filter"/> |
| 8 |
<field name="arch" type="xml"> |
| 9 |
<field name="invoice_user_id" position="after"> |
| 10 |
<field name="team_id"/> |
| 11 |
</field> |
| 12 |
<xpath expr="//group/filter[@name='status']" position="after"> |
| 13 |
<filter string="Sales Team" name="sales_channel" domain="[]" context="{'group_by':'team_id'}"/> |
| 14 |
</xpath> |
| 15 |
</field> |
| 16 |
</record> |
| 17 |
|
| 18 |
<record id="account_invoice_view_tree" model="ir.ui.view"> |
| 19 |
<field name="name">account.move.list.inherit.sale</field> |
| 20 |
<field name="model">account.move</field> |
| 21 |
<field name="inherit_id" ref="account.view_invoice_tree"/> |
| 22 |
<field name="arch" type="xml"> |
| 23 |
<field name="invoice_user_id" position="after"> |
| 24 |
<field name="team_id" column_invisible="context.get('default_move_type') not in ('out_invoice', 'out_refund', 'out_receipt')" optional="hide"/> |
| 25 |
</field> |
| 26 |
</field> |
| 27 |
</record> |
| 28 |
|
| 29 |
<record model="ir.ui.view" id="account_invoice_form"> |
| 30 |
<field name="name">Account Invoice</field> |
| 31 |
<field name="model">account.move</field> |
| 32 |
<field name="inherit_id" ref="account.view_move_form"/> |
| 33 |
<field name="arch" type="xml"> |
| 34 |
<xpath expr="//group[@name='sale_info_group']/field[@name='invoice_user_id']" position="after"> |
| 35 |
<field name="team_id" context="{'kanban_view_ref': 'sales_team.crm_team_view_kanban'}"/> |
| 36 |
</xpath> |
| 37 |
<xpath expr="//group[@id='other_tab_group']" position="inside"> |
| 38 |
<group string="Marketing" |
| 39 |
name="utm_link" |
| 40 |
groups="base.group_no_one" |
| 41 |
invisible="move_type not in ('out_invoice', 'out_refund')"> |
| 42 |
<field name="campaign_id" options="{'create_name_field': 'title'}"/> |
| 43 |
<field name="medium_id"/> |
| 44 |
<field name="source_id"/> |
| 45 |
</group> |
| 46 |
</xpath> |
| 47 |
<xpath expr="//div[@name='button_box']" position="inside"> |
| 48 |
<button class="oe_stat_button" |
| 49 |
name="action_view_source_sale_orders" |
| 50 |
type="object" |
| 51 |
icon="fa-pencil-square-o" |
| 52 |
invisible="sale_order_count == 0 or move_type not in ('out_invoice', 'out_refund', 'in_invoice', 'in_refund', 'out_receipt', 'in_receipt')"> |
| 53 |
<field string="Sale Orders" name="sale_order_count" widget="statinfo"/> |
| 54 |
</button> |
| 55 |
</xpath> |
| 56 |
<xpath expr="//field[@name='invoice_line_ids']/list" position="inside"> |
| 57 |
<field name="is_downpayment" column_invisible="1"/> |
| 58 |
</xpath> |
| 59 |
<xpath expr="//field[@name='invoice_line_ids']/list/field[@name='product_id']" position="attributes"> |
| 60 |
<attribute name="readonly">is_downpayment</attribute> |
| 61 |
</xpath> |
| 62 |
<header position="after"> |
| 63 |
<div class="alert alert-warning" role="alert" invisible="not sale_warning_text or move_type != 'out_invoice'"> |
| 64 |
<field name="sale_warning_text" class="fw-bold"/> |
| 65 |
</div> |
| 66 |
</header> |
| 67 |
<list name="journal_items" position="attributes"> |
| 68 |
<attribute name="decoration-warning" add="(sale_line_warn_msg and move_type == 'out_invoice')" separator=" or "/> |
| 69 |
</list> |
| 70 |
</field> |
| 71 |
</record> |
| 72 |
|
| 73 |
<record id="action_invoice_salesteams" model="ir.actions.act_window"> |
| 74 |
<field name="name">Invoices</field> |
| 75 |
<field name="res_model">account.move</field> |
| 76 |
<field name="view_mode">list,form,kanban</field> |
| 77 |
<field name="view_id" ref="account.view_move_tree"/> |
| 78 |
<field name="domain">[ |
| 79 |
('state', '=', 'posted'), |
| 80 |
('move_type', 'in', ['out_invoice', 'out_refund'])]</field> |
| 81 |
<field name="context">{ |
| 82 |
'search_default_team_id': [active_id], |
| 83 |
'default_team_id': active_id, |
| 84 |
'default_move_type':'out_invoice', |
| 85 |
'move_type':'out_invoice', |
| 86 |
'journal_type': 'sale', |
| 87 |
} |
| 88 |
</field> |
| 89 |
<field name="search_view_id" ref="account.view_account_invoice_filter"/> |
| 90 |
<field name="help" type="html"> |
| 91 |
<p class="o_view_nocontent_smiling_face"> |
| 92 |
Create a customer invoice |
| 93 |
</p><p> |
| 94 |
Create invoices, register payments and keep track of the discussions with your customers. |
| 95 |
</p> |
| 96 |
</field> |
| 97 |
</record> |
| 98 |
|
| 99 |
<record id="action_invoice_salesteams_view_tree" model="ir.actions.act_window.view"> |
| 100 |
<field name="sequence">1</field> |
| 101 |
<field name="view_mode">list</field> |
| 102 |
<field name="act_window_id" ref="sale.action_invoice_salesteams"/> |
| 103 |
</record> |
| 104 |
|
| 105 |
<record id="action_invoice_salesteams_view_form" model="ir.actions.act_window.view"> |
| 106 |
<field name="sequence">2</field> |
| 107 |
<field name="view_mode">form</field> |
| 108 |
<field name="view_id" ref="account.view_move_form"/> |
| 109 |
<field name="act_window_id" ref="sale.action_invoice_salesteams"/> |
| 110 |
</record> |
| 111 |
|
| 112 |
</odoo> |