[IMP] stock_picking_report_valued: black, isort, prettier

This commit is contained in:
Ernesto Tejeda
2021-01-05 09:32:19 -05:00
parent 60fd6d6e56
commit 28e41f378a
4 changed files with 33 additions and 17 deletions

View File

@@ -0,0 +1 @@
../../../../stock_picking_report_valued

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<template id="valued_report_picking" inherit_id="stock.report_delivery_document"> <template id="valued_report_picking" inherit_id="stock.report_delivery_document">
<xpath expr="//table[@t-if=&quot;o.move_line_ids and o.state==&apos;done&apos;&quot;]/thead/tr" <xpath
position="inside"> expr="//table[@t-if=&quot;o.move_line_ids and o.state==&apos;done&apos;&quot;]/thead/tr"
position="inside"
>
<t t-if="o.valued and o.sale_id and o.move_line_ids"> <t t-if="o.valued and o.sale_id and o.move_line_ids">
<t t-if="o.state != 'done'"> <t t-if="o.state != 'done'">
<th class="text-right"><strong>Qty Reserved</strong></th> <th class="text-right"><strong>Qty Reserved</strong></th>
@@ -20,21 +22,25 @@
<t t-if="o.valued and o.sale_id and o.move_line_ids"> <t t-if="o.valued and o.sale_id and o.move_line_ids">
<t t-if="move_line.picking_id.state != 'done'"> <t t-if="move_line.picking_id.state != 'done'">
<td class="text-right"> <td class="text-right">
<span t-field="move_line.product_uom_qty"/> <span t-field="move_line.product_uom_qty" />
<span t-field="move_line.product_uom_id"/></td> <span t-field="move_line.product_uom_id" /></td>
</t> </t>
<td class="text-right"><span <td class="text-right"><span t-field="move_line.sale_price_unit" /></td>
t-field="move_line.sale_price_unit" /></td>
<td class="text-right" groups="product.group_discount_per_so_line"> <td class="text-right" groups="product.group_discount_per_so_line">
<span t-field="move_line.sale_discount" /> <span t-field="move_line.sale_discount" />
</td> </td>
<td class="text-right"><span <td class="text-right"><span
t-field="move_line.sale_price_subtotal" /></td> t-field="move_line.sale_price_subtotal"
/></td>
<td class="text-right"><span <td class="text-right"><span
t-field="move_line.sale_tax_description"/></td> t-field="move_line.sale_tax_description"
/></td>
</t> </t>
</xpath> </xpath>
<xpath expr="//table[@t-if=&quot;o.move_line_ids and o.state==&apos;done&apos;&quot;]" position="after"> <xpath
expr="//table[@t-if=&quot;o.move_line_ids and o.state==&apos;done&apos;&quot;]"
position="after"
>
<t t-if="o.valued and o.sale_id and o.move_line_ids"> <t t-if="o.valued and o.sale_id and o.move_line_ids">
<table class="table table-sm mt32"> <table class="table table-sm mt32">
<thead> <thead>
@@ -47,13 +53,13 @@
<tbody> <tbody>
<tr> <tr>
<td class="text-right"> <td class="text-right">
<span t-field="o.amount_untaxed"/> <span t-field="o.amount_untaxed" />
</td> </td>
<td class="text-right"> <td class="text-right">
<span t-field="o.amount_tax"/> <span t-field="o.amount_tax" />
</td> </td>
<td class="text-right"> <td class="text-right">
<span t-field="o.amount_total"/> <span t-field="o.amount_total" />
</td> </td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<record model="ir.ui.view" id="view_partner_valued_picking"> <record model="ir.ui.view" id="view_partner_valued_picking">
<field name="name">Partner view (Valued picking)</field> <field name="name">Partner view (Valued picking)</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//page[@name='sales_purchases']//field[@name='user_id']" position="after"> <xpath
<field name="valued_picking"/> expr="//page[@name='sales_purchases']//field[@name='user_id']"
position="after"
>
<field name="valued_picking" />
</xpath> </xpath>
</field> </field>
</record> </record>