[IMP] Add new snippets and improve views

This commit is contained in:
Janik von Rotz committed 2021-09-07 11:34:56 +02:00
1 parent 28c6f89e52
commit ca1eebccc4
5 files changed
+55 -2

No files matched your search

@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" sequence="50">
<xpath expr="//table/thead/tr/th[1]" position="before">
<th>
<span>Pos</span>
</th>
</xpath>
<xpath expr="//table/tbody/t[3]/tr/t[1]/td[1]" position="before">
<td>
<span t-esc="o.sale_order_id.get_position(line.product_id)"/>
</td>
</xpath>
</data>
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!-- Show custom field country of origin and hs code -->
<data inherit_id="account.report_invoice_document">
<data inherit_id="account.report_invoice_document" sequence="50">
<xpath expr="//table/tbody/t[3]/tr/t[1]/td[1]/span" position="after">
<t t-if="line.product_id.x_country_of_origin">
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<data inherit_id="sale.view_order_form" sequence="50">
<field name="display_type" position="before">
<field name="sequence"/>
</field>
<xpath expr="//field[@name='order_line']/tree[1]/field[@name='sequence']" position="after">
<field name="sequence"/>
</xpath>
</data>
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<data inherit_id="stock.report_picking" sequence="50">
<xpath expr="//table[1]/thead/tr/th[1]" position="before">
<th>
<strong>Pos</strong>
</th>
</xpath>
<xpath expr="//table[1]/tbody/t/t/tr/td[1]" position="before">
<td>
<span t-esc="o.sale_id.get_position(ml.product_id)"/>
</td>
</xpath>
</data>
+12 -1
View File
@@ -1,7 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.ui.view" id="{{ name }}.document_list">
<record id="show_position" model="ir.ui.view">
<field name="name">sale.view_order_form.show_position</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree[1]/field[@name='sequence']" position="after">
<field name="position"/>
</xpath>
</field>
</record>
<record id=".document_list" model="ir.ui.view">
<field name="name">Document List</field>
<field name="model">{{ name }}.document</field>
<field name="arch" type="xml">