mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]: pms_board_service_line amount depends of property
This commit is contained in:
@@ -39,7 +39,7 @@ class PmsBoardServiceLine(models.Model):
|
|||||||
help="Price for this Board Service Line/Product",
|
help="Price for this Board Service Line/Product",
|
||||||
default=lambda self: self._get_default_price(),
|
default=lambda self: self._get_default_price(),
|
||||||
compute="_compute_amount",
|
compute="_compute_amount",
|
||||||
inverse="_inverse_ir_pms_property",
|
inverse="_inverse_amount",
|
||||||
digits=("Product Price"),
|
digits=("Product Price"),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ class PmsBoardServiceLine(models.Model):
|
|||||||
if ir_pms_property:
|
if ir_pms_property:
|
||||||
record.amount = ir_pms_property.value_float
|
record.amount = ir_pms_property.value_float
|
||||||
|
|
||||||
def _inverse_ir_pms_property(self):
|
def _inverse_amount(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
pms_property_id = self.env.user.get_active_property_ids()[0]
|
pms_property_id = self.env.user.get_active_property_ids()[0]
|
||||||
if pms_property_id:
|
if pms_property_id:
|
||||||
|
|||||||
Reference in New Issue
Block a user