[IMP] translated for generate ru filenames
This commit is contained in:
parent
34e73ebc4a
commit
8de9a0fa27
@ -139,18 +139,18 @@ class DocumentTemplate(models.Model):
|
||||
document_type = fields.Selection(
|
||||
string="Type of document",
|
||||
selection=[
|
||||
("contract", "Contract"),
|
||||
("annex", "Annex"),
|
||||
("addition", "Addition"),
|
||||
("contract", _("Contract")),
|
||||
("annex", _("Annex")),
|
||||
("addition", _("Addition")),
|
||||
]
|
||||
)
|
||||
document_type_name = fields.Selection(
|
||||
string="Document",
|
||||
selection=[
|
||||
("specification", "Specification"),
|
||||
("approval_list", "Approval List"),
|
||||
("act_at", "Act of Acceptance and Transfer"),
|
||||
("act_ad", "Act of Acceptance and Delivery"),
|
||||
("specification", _("Specification")),
|
||||
("approval_list", _("Approval List")),
|
||||
("act_at", _("Act of Acceptance and Transfer")),
|
||||
("act_ad", _("Act of Acceptance and Delivery")),
|
||||
]
|
||||
)
|
||||
company_type = fields.Selection(
|
||||
|
@ -156,14 +156,14 @@ class ContractWizard(models.TransientModel):
|
||||
if self.target._name == "res.partner.contract":
|
||||
contract = self.target
|
||||
attachment_name = _("{type} {number} from {date}").format(
|
||||
type=dict(self.document_template._fields['document_type'].selection).get(self.document_template.document_type),
|
||||
type=_(dict(self.document_template._fields['document_type'].selection).get(self.document_template.document_type)),
|
||||
number=contract.name,
|
||||
date=contract.get_date().strftime("%d.%m.%Y"),
|
||||
)
|
||||
elif self.target._name == "res.partner.contract.annex":
|
||||
annex = self.target
|
||||
attachment_name = "{type} №{name}".format(
|
||||
type=dict(self.document_template._fields['document_type'].selection).get(self.document_template.document_type),
|
||||
type=_(dict(self.document_template._fields['document_type'].selection).get(self.document_template.document_type)),
|
||||
name={
|
||||
"specification": "{number} {type} {name}",
|
||||
"approval_list": "{number}.1 {type} {name}-1",
|
||||
@ -171,7 +171,7 @@ class ContractWizard(models.TransientModel):
|
||||
"act_ad": "{number}.3 {type} {name}-3",
|
||||
}.get(self.document_template.document_type_name).format(
|
||||
number=annex.number,
|
||||
type=dict(self.document_template._fields['document_type_name'].selection).get(self.document_template.document_type_name),
|
||||
type=_(dict(self.document_template._fields['document_type_name'].selection).get(self.document_template.document_type_name)),
|
||||
name=annex.name,
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user