mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
Proxy fields defaults with lambda to allow inheritance
This commit is contained in:
committed by
ahenriquez
parent
4b30d8c0ba
commit
450b8a2b49
@@ -50,12 +50,15 @@ class RmaOrder(models.Model):
|
||||
string='Group Number', index=True, copy=False)
|
||||
type = fields.Selection(
|
||||
[('customer', 'Customer'), ('supplier', 'Supplier')],
|
||||
string="Type", required=True, default=_get_default_type, readonly=True)
|
||||
string="Type", required=True,
|
||||
default=lambda self: self._get_default_type(),
|
||||
readonly=True
|
||||
)
|
||||
reference = fields.Char(string='Partner Reference',
|
||||
help="The partner reference of this RMA order.")
|
||||
comment = fields.Text('Additional Information')
|
||||
date_rma = fields.Datetime(string='Order Date', index=True,
|
||||
default=_default_date_rma)
|
||||
default=lambda self: self._default_date_rma(),)
|
||||
partner_id = fields.Many2one(
|
||||
comodel_name='res.partner', string='Partner', required=True)
|
||||
rma_line_ids = fields.One2many('rma.order.line', 'rma_id',
|
||||
|
||||
Reference in New Issue
Block a user