mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[IMP] Remove domain from onchange method and put it in field view
This commit is contained in:
committed by
JasminSForgeFlow
parent
fbf2881b76
commit
cd46134010
@@ -730,7 +730,7 @@ class RmaOrderLine(models.Model):
|
|||||||
)
|
)
|
||||||
if self.lot_id.product_id != self.product_id:
|
if self.lot_id.product_id != self.product_id:
|
||||||
self.lot_id = False
|
self.lot_id = False
|
||||||
return {"domain": {"lot_id": [("product_id", "=", self.product_id.id)]}}
|
return result
|
||||||
|
|
||||||
@api.onchange("operation_id")
|
@api.onchange("operation_id")
|
||||||
def _onchange_operation_id(self):
|
def _onchange_operation_id(self):
|
||||||
|
|||||||
@@ -203,6 +203,7 @@
|
|||||||
groups="stock.group_production_lot"
|
groups="stock.group_production_lot"
|
||||||
attrs="{'required': [('product_tracking', 'in', ('serial', 'lot'))]}"
|
attrs="{'required': [('product_tracking', 'in', ('serial', 'lot'))]}"
|
||||||
context="{'default_product_id': product_id,}"
|
context="{'default_product_id': product_id,}"
|
||||||
|
domain="[('product_id', '=', product_id)]"
|
||||||
/>
|
/>
|
||||||
<field name="under_warranty" />
|
<field name="under_warranty" />
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
Reference in New Issue
Block a user