[MIG] stock_picking_report_valued: Migration to v13.0

This commit is contained in:
Sergio Teruel
2020-02-20 19:35:44 +01:00
parent 8189e391ab
commit ac70392152
8 changed files with 21 additions and 21 deletions

View File

@@ -14,13 +14,13 @@ Valued Picking Report
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-reporting/tree/12.0/stock_picking_report_valued
:target: https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_valued
:alt: OCA/stock-logistics-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-12-0/stock-logistics-reporting-12-0-stock_picking_report_valued
:target: https://translation.odoo-community.org/projects/stock-logistics-reporting-13-0/stock-logistics-reporting-13-0-stock_picking_report_valued
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/151/12.0
:target: https://runbot.odoo-community.org/runbot/151/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -63,7 +63,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_picking_report_valued%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_picking_report_valued%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -90,6 +90,7 @@ Contributors
* David Vidal
* Luis M. Ontalba
* Ernesto Tejeda
* Sergio Teruel
Maintainers
~~~~~~~~~~~
@@ -104,6 +105,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/12.0/stock_picking_report_valued>`_ project on GitHub.
This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_valued>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

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

View File

@@ -4,7 +4,7 @@
# Copyright 2016-2018 Carlos Dauden - Tecnativa <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo import fields, models
class StockMoveLine(models.Model):
@@ -42,7 +42,6 @@ class StockMoveLine(models.Model):
compute="_compute_sale_order_line_fields", string="Total", compute_sudo=True
)
@api.multi
def _compute_sale_order_line_fields(self):
"""This is computed with sudo for avoiding problems if you don't have
access to sales orders (stricter warehouse users, inter-company

View File

@@ -4,7 +4,7 @@
# Copyright 2016 Luis M. Ontalba - Tecnativa <luis.martinez@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo import fields, models
class StockPicking(models.Model):
@@ -29,7 +29,6 @@ class StockPicking(models.Model):
compute="_compute_amount_all", string="Total", compute_sudo=True
)
@api.multi
def _compute_amount_all(self):
"""This is computed with sudo for avoiding problems if you don't have
access to sales orders (stricter warehouse users, inter-company
@@ -38,7 +37,7 @@ class StockPicking(models.Model):
for pick in self:
round_curr = pick.sale_id.currency_id.round
amount_tax = 0.0
for tax_id, tax_group in pick.get_taxes_values().items():
for tax_group in pick.get_taxes_values().values():
amount_tax += round_curr(tax_group["amount"])
amount_untaxed = sum(l.sale_price_subtotal for l in pick.move_line_ids)
pick.update(
@@ -49,7 +48,6 @@ class StockPicking(models.Model):
}
)
@api.multi
def get_taxes_values(self):
tax_grouped = {}
for line in self.move_line_ids:

View File

@@ -10,3 +10,4 @@
* David Vidal
* Luis M. Ontalba
* Ernesto Tejeda
* Sergio Teruel

View File

@@ -9,7 +9,7 @@
<th class="text-right"><strong>Qty Reserved</strong></th>
</t>
<th class="text-right"><strong>Unit Price</strong></th>
<th class="text-right" groups="sale.group_discount_per_so_line">
<th class="text-right" groups="product.group_discount_per_so_line">
<strong>Discount</strong>
</th>
<th class="text-right"><strong>Subtotal</strong></th>
@@ -25,7 +25,7 @@
</t>
<td class="text-right"><span
t-field="move_line.sale_price_unit" /></td>
<td class="text-right" groups="sale.group_discount_per_so_line">
<td class="text-right" groups="product.group_discount_per_so_line">
<span t-field="move_line.sale_discount" />
</td>
<td class="text-right"><span
@@ -36,7 +36,7 @@
</xpath>
<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">
<table class="table table-condensed mt32">
<table class="table table-sm mt32">
<thead>
<tr>
<th class="text-right"><strong>Untaxed Amount</strong></th>

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/12.0/stock_picking_report_valued"><img alt="OCA/stock-logistics-reporting" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-reporting-12-0/stock-logistics-reporting-12-0-stock_picking_report_valued"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/151/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_valued"><img alt="OCA/stock-logistics-reporting" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--reporting-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-reporting-13-0/stock-logistics-reporting-13-0-stock_picking_report_valued"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/151/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Add amount information to Delivery Slip report.
You can select at partner level if picking list report must be valued or not.
If the picking is done its valued with quantity done, otherwise the picking
@@ -416,7 +416,7 @@ customer.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_picking_report_valued%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/issues/new?body=module:%20stock_picking_report_valued%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -441,6 +441,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>David Vidal</li>
<li>Luis M. Ontalba</li>
<li>Ernesto Tejeda</li>
<li>Sergio Teruel</li>
</ul>
</li>
</ul>
@@ -452,7 +453,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/12.0/stock_picking_report_valued">OCA/stock-logistics-reporting</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-reporting/tree/13.0/stock_picking_report_valued">OCA/stock-logistics-reporting</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -7,8 +7,8 @@
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='sales_purchases']//field[@name='user_id']" position="after">
<field name="valued_picking"
attrs="{'invisible': [('customer', '=', False)]}"/>
<field name="customer_rank" invisible="1"/>
<field name="valued_picking" attrs="{'invisible': [('customer_rank', '>', 0)]}"/>
</xpath>
</field>
</record>