19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:47 +01:00
parent accf5918df
commit 6e65e8c877
688 changed files with 225434 additions and 199401 deletions

View file

@ -5,7 +5,7 @@ from odoo import models
from odoo.tools import format_date
class ReceptionReport(models.AbstractModel):
class ReportStockReport_Reception(models.AbstractModel):
_inherit = 'report.stock.report_reception'
def _get_docs(self, docids):
@ -23,7 +23,7 @@ class ReceptionReport(models.AbstractModel):
def _get_moves(self, docs):
if self.env.context.get('default_production_ids'):
return docs.move_finished_ids.filtered(lambda m: m.product_id.type == 'product' and m.state != 'cancel')
return docs.move_finished_ids.filtered(lambda m: m.product_id.is_storable and m.state != 'cancel')
return super()._get_moves(docs)
def _get_extra_domain(self, docs):
@ -33,15 +33,10 @@ class ReceptionReport(models.AbstractModel):
def _get_formatted_scheduled_date(self, source):
if source._name == 'mrp.production':
return format_date(self.env, source.date_planned_start)
return format_date(self.env, source.date_start)
return super()._get_formatted_scheduled_date(source)
def _action_assign(self, in_move, out_move):
if in_move.production_id:
in_move.production_id.move_dest_ids |= out_move
if not out_move.group_id and out_move._get_source_document() not in [False, out_move.picking_id]:
out_move.group_id = out_move._get_source_document()
def _action_unassign(self, in_move, out_move):
super()._action_unassign(in_move, out_move)
if in_move.production_id:
in_move.production_id.move_dest_ids -= out_move