[IMP] order id domain
This commit is contained in:
parent
fa2ab72213
commit
0f6d44e809
@ -22,8 +22,8 @@ class ContractOrderAnnex(models.Model, IDocument, Extension):
|
|||||||
order_id = fields.Many2one(
|
order_id = fields.Many2one(
|
||||||
"sale.order",
|
"sale.order",
|
||||||
string="Order",
|
string="Order",
|
||||||
required=True,
|
|
||||||
help="Orders with this partner which are not uses in annexes yet",
|
help="Orders with this partner which are not uses in annexes yet",
|
||||||
|
required=True,
|
||||||
)
|
)
|
||||||
date_conclusion = fields.Date(
|
date_conclusion = fields.Date(
|
||||||
string="Conclusion Date", default=fields.Date.today(),
|
string="Conclusion Date", default=fields.Date.today(),
|
||||||
@ -60,8 +60,11 @@ class ContractOrderAnnex(models.Model, IDocument, Extension):
|
|||||||
contract=contract_number, order=order_number,
|
contract=contract_number, order=order_number,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Compute domain for order_id because of bug with
|
@api.onchange("order_id")
|
||||||
# not working correctly domain in model
|
def _domain_order_id(self):
|
||||||
|
"""Using domain function because of
|
||||||
|
simple domain does not working properly because of
|
||||||
|
contract_id is still False"""
|
||||||
return {
|
return {
|
||||||
"domain": {
|
"domain": {
|
||||||
"order_id": [
|
"order_id": [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user