[STYLE] black
This commit is contained in:
parent
0204140430
commit
be3339e8d4
@ -90,7 +90,9 @@ class PartnerContract(models.Model):
|
|||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def action_print_form(self):
|
def action_print_form(self):
|
||||||
view = self.env.ref("{}.res_partner_wizard_print_contract_view".format(MODULE_NAME))
|
view = self.env.ref(
|
||||||
|
"{}.res_partner_wizard_print_contract_view".format(MODULE_NAME)
|
||||||
|
)
|
||||||
return {
|
return {
|
||||||
"name": _("Print Form of Contract"),
|
"name": _("Print Form of Contract"),
|
||||||
"type": "ir.actions.act_window",
|
"type": "ir.actions.act_window",
|
||||||
|
@ -58,7 +58,9 @@ class ContractOrderAnnex(models.Model):
|
|||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def action_print_form(self):
|
def action_print_form(self):
|
||||||
view = self.env.ref("{}.res_partner_wizard_print_annex_view".format(MODULE_NAME))
|
view = self.env.ref(
|
||||||
|
"{}.res_partner_wizard_print_annex_view".format(MODULE_NAME)
|
||||||
|
)
|
||||||
return {
|
return {
|
||||||
"name": _("Print Form of Contract Annex"),
|
"name": _("Print Form of Contract Annex"),
|
||||||
"type": "ir.actions.act_window",
|
"type": "ir.actions.act_window",
|
||||||
|
@ -1 +1 @@
|
|||||||
MODULE_NAME = __package__.split('.')[-2]
|
MODULE_NAME = __package__.split(".")[-2]
|
||||||
|
@ -77,8 +77,12 @@ class ContractWizard(models.TransientModel):
|
|||||||
self.partner_id = partner_id
|
self.partner_id = partner_id
|
||||||
|
|
||||||
model_to_action = {
|
model_to_action = {
|
||||||
"res.partner.contract": "{}.action_get_contract_context".format(MODULE_NAME),
|
"res.partner.contract": "{}.action_get_contract_context".format(
|
||||||
"res.partner.contract.annex": "{}.action_get_annex_context".format(MODULE_NAME),
|
MODULE_NAME
|
||||||
|
),
|
||||||
|
"res.partner.contract.annex": "{}.action_get_annex_context".format(
|
||||||
|
MODULE_NAME
|
||||||
|
),
|
||||||
}
|
}
|
||||||
action = model_to_action[active_model]
|
action = model_to_action[active_model]
|
||||||
|
|
||||||
@ -98,7 +102,12 @@ class ContractWizard(models.TransientModel):
|
|||||||
.id,
|
.id,
|
||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
for field, value in sorted(contract_context_values.items(), key=lambda tpl: self.env.ref("{}.contract_field_{}".format(MODULE_NAME, tpl[0])).sequence)
|
for field, value in sorted(
|
||||||
|
contract_context_values.items(),
|
||||||
|
key=lambda tpl: self.env.ref(
|
||||||
|
"{}.contract_field_{}".format(MODULE_NAME, tpl[0])
|
||||||
|
).sequence,
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
# Set up template domain
|
# Set up template domain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user