mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[IMP] rma: add date to rma_order_line
This commit is contained in:
committed by
AaronHForgeFlow
parent
b4ff6c45dc
commit
d312c8cd01
@@ -228,6 +228,10 @@ class RmaOrderLine(models.Model):
|
||||
for rec in self.filtered(lambda r: r.type == "supplier"):
|
||||
rec.rma_line_count = len(rec.customer_rma_id)
|
||||
|
||||
@api.model
|
||||
def _default_date_rma(self):
|
||||
return fields.Datetime.now()
|
||||
|
||||
delivery_address_id = fields.Many2one(
|
||||
comodel_name="res.partner",
|
||||
string="Partner delivery address",
|
||||
@@ -259,6 +263,9 @@ class RmaOrderLine(models.Model):
|
||||
states={"draft": [("readonly", False)]},
|
||||
help="Reference of the document that produced this rma.",
|
||||
)
|
||||
date = fields.Datetime(
|
||||
string="Order Date", index=True, default=lambda self: self._default_date_rma()
|
||||
)
|
||||
state = fields.Selection(
|
||||
selection=[
|
||||
("draft", "Draft"),
|
||||
|
||||
Reference in New Issue
Block a user