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
9d8d282beb
commit
dfd409fa3e
@@ -44,6 +44,7 @@ Contributors
|
|||||||
* Aaron Henriquez <ahenriquez@eficent.com>
|
* Aaron Henriquez <ahenriquez@eficent.com>
|
||||||
* Lois Rilo <lois.rilo@eficent.com>
|
* Lois Rilo <lois.rilo@eficent.com>
|
||||||
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
* Bhavesh Odedra <bodedra@opensourceintegrators.com>
|
||||||
|
* Akim Juillerat <akim.juillerat@camptocamp.com>
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class RmaOrderLine(models.Model):
|
|||||||
|
|
||||||
invoice_address_id = fields.Many2one(
|
invoice_address_id = fields.Many2one(
|
||||||
'res.partner', string='Partner invoice address',
|
'res.partner', string='Partner invoice address',
|
||||||
default=_default_invoice_address,
|
default=lambda self: self._default_invoice_address(),
|
||||||
readonly=True, states={'draft': [('readonly', False)]},
|
readonly=True, states={'draft': [('readonly', False)]},
|
||||||
help="Invoice address for current rma order.",
|
help="Invoice address for current rma order.",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ class RmaRefund(models.TransientModel):
|
|||||||
)
|
)
|
||||||
date = fields.Date(string='Accounting Date')
|
date = fields.Date(string='Accounting Date')
|
||||||
description = fields.Char(
|
description = fields.Char(
|
||||||
string='Reason', required=True, default=_get_reason,
|
string='Reason', required=True,
|
||||||
|
default=lambda self: self._get_reason(),
|
||||||
)
|
)
|
||||||
item_ids = fields.One2many(
|
item_ids = fields.One2many(
|
||||||
comodel_name='rma.refund.item',
|
comodel_name='rma.refund.item',
|
||||||
|
|||||||
Reference in New Issue
Block a user