[UPD] remove compute function
This commit is contained in:
@@ -4,14 +4,7 @@ from odoo import fields, models
|
|||||||
class PurchaseReport(models.Model):
|
class PurchaseReport(models.Model):
|
||||||
_inherit = "purchase.report"
|
_inherit = "purchase.report"
|
||||||
|
|
||||||
date_planned = fields.Datetime(compute="_compute_date_planned", store=True)
|
date_planned = fields.Datetime(store=True)
|
||||||
|
|
||||||
def _compute_date_planned(self):
|
|
||||||
for record in self:
|
|
||||||
order_line = record.order_id.order_line.filtered(
|
|
||||||
lambda r: r.product_id == record.product_id
|
|
||||||
)
|
|
||||||
record.date_planned = order_line.date_planned
|
|
||||||
|
|
||||||
def _select(self):
|
def _select(self):
|
||||||
select_str = super(PurchaseReport, self)._select()
|
select_str = super(PurchaseReport, self)._select()
|
||||||
|
|||||||
Reference in New Issue
Block a user