[FIX] quickfix
This commit is contained in:
parent
c484f3bec0
commit
1a15fe8709
@ -70,13 +70,10 @@ class PartnerContract(models.Model):
|
|||||||
"context": {"self_id": self.id},
|
"context": {"self_id": self.id},
|
||||||
}
|
}
|
||||||
|
|
||||||
@api.model
|
@api.onchange('partner_id')
|
||||||
def create(self, vals):
|
def _onchange_partner_id(self):
|
||||||
|
|
||||||
datetime_now = datetime.datetime.now().strftime("%Y-%m-%d")
|
datetime_now = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||||
vals["name"] = self._calculate_contract_name(datetime_now)
|
self.name = self._calculate_contract_name(datetime_now)
|
||||||
|
|
||||||
return super(PartnerContract, self).create(vals)
|
|
||||||
|
|
||||||
def _calculate_contract_name(self, _date):
|
def _calculate_contract_name(self, _date):
|
||||||
|
|
||||||
|
@ -90,9 +90,8 @@ class ContractWizard(models.TransientModel):
|
|||||||
else self.target.contract_id.partner_id
|
else self.target.contract_id.partner_id
|
||||||
)
|
)
|
||||||
|
|
||||||
self.write(
|
self.company_id = company_id
|
||||||
{"company_id": company_id, "partner_id": partner_id,}
|
self.partner_id = partner_id
|
||||||
)
|
|
||||||
|
|
||||||
model_to_action = {
|
model_to_action = {
|
||||||
"res.partner.contract": "client_contracts.action_get_contract_context",
|
"res.partner.contract": "client_contracts.action_get_contract_context",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user