[MIG] stock_picking_report_valued: Migration to 16.0

This commit is contained in:
miguels73
2023-01-25 16:43:07 +01:00
committed by chien
parent 7ab1eff7a5
commit 8e5a6db787
4 changed files with 22 additions and 18 deletions

View File

@@ -8,7 +8,7 @@
{
"name": "Valued Picking Report",
"summary": "Adding Valued Picking on Delivery Slip report",
"version": "15.0.1.5.0",
"version": "16.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-reporting",
"category": "Warehouse Management",

View File

@@ -45,7 +45,7 @@ class StockMoveLine(models.Model):
)
def _get_report_valued_quantity(self):
return self.qty_done or self.product_qty
return self.qty_done or self.reserved_qty
def _compute_sale_order_line_fields(self):
"""This is computed with sudo for avoiding problems if you don't have

View File

@@ -19,3 +19,7 @@
* `Landoo <https://www.landoo.es>`_:
* Aritz Olea <ao@landoo.es>
* `Studio73 <https://www.studio73.es>`_:
* Miguel Gandia <miguel@studio73.es>

View File

@@ -11,14 +11,14 @@
>
<t t-if="o.valued and o.sale_id and o.move_line_ids and is_outgoing">
<t t-if="o.state != 'done'">
<th class="text-right"><strong>Qty Reserved</strong></th>
<th class="text-end"><strong>Qty Reserved</strong></th>
</t>
<th class="text-right"><strong>Unit Price</strong></th>
<th class="text-right" groups="product.group_discount_per_so_line">
<th class="text-end"><strong>Unit Price</strong></th>
<th class="text-end" groups="product.group_discount_per_so_line">
<strong>Discount</strong>
</th>
<th class="text-right"><strong>Subtotal</strong></th>
<th class="text-right"><strong>Taxes</strong></th>
<th class="text-end"><strong>Subtotal</strong></th>
<th class="text-end"><strong>Taxes</strong></th>
</t>
</xpath>
<xpath expr="//th[@name='th_sml_qty_ordered']" position="attributes">
@@ -66,20 +66,20 @@
<table class="table table-sm mt32">
<thead>
<tr>
<th class="text-right"><strong>Untaxed Amount</strong></th>
<th class="text-right"><strong>Taxes</strong></th>
<th class="text-right"><strong>Total</strong></th>
<th class="text-end"><strong>Untaxed Amount</strong></th>
<th class="text-end"><strong>Taxes</strong></th>
<th class="text-end"><strong>Total</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-right">
<td class="text-end">
<span t-field="o.amount_untaxed" />
</td>
<td class="text-right">
<td class="text-end">
<span t-field="o.amount_tax" />
</td>
<td class="text-right">
<td class="text-end">
<span t-field="o.amount_total" />
</td>
</tr>
@@ -95,7 +95,7 @@
>
<xpath expr="//td[@name='move_line_lot_qty_done']" position="after">
<t t-if="move_line.picking_id.state != 'done'">
<td class="text-right">
<td class="text-end">
<span t-field="move_line.product_uom_qty" />
<span t-field="move_line.product_uom_id" /></td>
</t>
@@ -105,14 +105,14 @@
<span t-field="move_line.product_uom_id" /></td>
</t>
<t t-if="o.valued and o.sale_id and o.move_line_ids and is_outgoing">
<td class="text-right"><span t-field="move_line.sale_price_unit" /></td>
<td class="text-right" groups="product.group_discount_per_so_line">
<td class="text-end"><span t-field="move_line.sale_price_unit" /></td>
<td class="text-end" groups="product.group_discount_per_so_line">
<span t-field="move_line.sale_discount" />
</td>
<td class="text-right"><span
<td class="text-end"><span
t-field="move_line.sale_price_subtotal"
/></td>
<td class="text-right"><span
<td class="text-end"><span
t-field="move_line.sale_tax_description"
/></td>
</t>