Odoo api.onchange & 布尔值
Odoo api.onchange & Boolean
Odoo 10 -
我有一个名为 floor 的布尔字段。如果布尔值是真的,我只想 运行 下面。这可能吗?
@api.onchange('suggestbox')
def _onchange_squaremetrsold(self):
self.squaremtrsold = (self.squarebox or 1) * (self.suggestbox)
self.product_uom_qty = (self.squaremtrsold or 1)
您在找这样的东西吗?
@api.onchange('suggestbox')
def _onchange_squaremetrsold(self):
if self.floor:
self.squaremtrsold = (self.squarebox or 1) * (self.suggestbox)
self.product_uom_qty = (self.squaremtrsold or 1)
Odoo 10 - 我有一个名为 floor 的布尔字段。如果布尔值是真的,我只想 运行 下面。这可能吗?
@api.onchange('suggestbox')
def _onchange_squaremetrsold(self):
self.squaremtrsold = (self.squarebox or 1) * (self.suggestbox)
self.product_uom_qty = (self.squaremtrsold or 1)
您在找这样的东西吗?
@api.onchange('suggestbox')
def _onchange_squaremetrsold(self):
if self.floor:
self.squaremtrsold = (self.squarebox or 1) * (self.suggestbox)
self.product_uom_qty = (self.squaremtrsold or 1)