mirror of
https://github.com/bringout/oca-mrp.git
synced 2026-04-26 04:12:07 +02:00
Initial commit: OCA Mrp packages (117 packages)
This commit is contained in:
commit
277e84fd7a
4403 changed files with 395154 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
# Copyright 2019 Camptocamp SA
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class SaleOrderLine(models.Model):
|
||||
_inherit = "sale.order.line"
|
||||
|
||||
def _get_delivered_quantity_by_analytic(self, additional_domain):
|
||||
# If we land here is only because we are dealing w/ SO lines
|
||||
# having `qty_delivered_method` equal to `analytic` or `timesheet`.
|
||||
# The 1st case matches expenses lines the latter TS lines.
|
||||
# Expenses are already discarded in our a.a.l. overrides
|
||||
# so it's fine to set the ctx key here anyway.
|
||||
return super(
|
||||
SaleOrderLine, self.with_context(timesheet_rounding=True)
|
||||
)._get_delivered_quantity_by_analytic(additional_domain)
|
||||
|
||||
@api.depends("analytic_line_ids.unit_amount_rounded")
|
||||
def _compute_qty_delivered(self):
|
||||
"""Adds the dependency on unit_amount_rounded."""
|
||||
return super()._compute_qty_delivered()
|
||||
Loading…
Add table
Add a link
Reference in a new issue