mirror of
https://github.com/OCA/stock-logistics-reporting.git
synced 2025-02-16 17:13:21 +02:00
[MIG] stock_picking_report_valued: Migration to v13.0
This commit is contained in:
committed by
Ernesto Tejeda
parent
57562ecaee
commit
263ed8f47e
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user