Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
19
sale_order_line_sequence/views/account_move_view.xml
Executable file
19
sale_order_line_sequence/views/account_move_view.xml
Executable file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
<field name="name">account.move.form</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='invoice_line_ids']/list/field[@name='sequence']"
|
||||
position="before"
|
||||
>
|
||||
<field
|
||||
name="related_so_sequence"
|
||||
column_invisible="parent.move_type != 'out_invoice'"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
24
sale_order_line_sequence/views/report_invoice.xml
Executable file
24
sale_order_line_sequence/views/report_invoice.xml
Executable file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="report_invoice_document_inherit_sale_sequence"
|
||||
inherit_id="account.report_invoice_document"
|
||||
>
|
||||
<!--complicated expr to be compatible with other modules-->
|
||||
<xpath expr="//table/thead/tr/th[1]" position="before">
|
||||
<th
|
||||
t-if="(o.move_type == 'out_invoice' or o.move_type == 'out_refund') and any(l.related_so_sequence for l in o.invoice_line_ids)"
|
||||
>
|
||||
Line Number
|
||||
</th>
|
||||
</xpath>
|
||||
<!--complicated expr to be compatible with other modules-->
|
||||
<xpath expr="//table/tbody//span[1]/.." position="before">
|
||||
<td
|
||||
t-if="(o.move_type == 'out_invoice' or o.move_type == 'out_refund') and line.related_so_sequence"
|
||||
>
|
||||
<span t-field="line.related_so_sequence" />
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
24
sale_order_line_sequence/views/report_saleorder.xml
Executable file
24
sale_order_line_sequence/views/report_saleorder.xml
Executable file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="report_saleorder_document_sequence"
|
||||
inherit_id="sale.report_saleorder_document"
|
||||
>
|
||||
<xpath
|
||||
expr="//table[hasclass('table')]/thead/tr/th[@name='th_description']"
|
||||
position="before"
|
||||
>
|
||||
<th name="th_visible_sequence">
|
||||
<strong>Line Number</strong>
|
||||
</th>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//tbody[hasclass('sale_tbody')]//td[@name='td_name']/span[@t-field='line.name']/.."
|
||||
position="before"
|
||||
>
|
||||
<td name="td_visible_sequence">
|
||||
<span t-field="line.visible_sequence" />
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
21
sale_order_line_sequence/views/sale_view.xml
Executable file
21
sale_order_line_sequence/views/sale_view.xml
Executable file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">sale.order.form</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="order_line" position="attributes">
|
||||
<attribute
|
||||
name="context"
|
||||
>{'default_sequence': max_line_sequence}</attribute>
|
||||
</field>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/list/field[@name='product_id']"
|
||||
position="before"
|
||||
>
|
||||
<field name="visible_sequence" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user