work started
This commit is contained in:
parent
c4809eefd4
commit
04dedf864d
@ -4,13 +4,14 @@
|
|||||||
"summary": """
|
"summary": """
|
||||||
Print forms for contracts with clients""",
|
Print forms for contracts with clients""",
|
||||||
"description": """
|
"description": """
|
||||||
Module for storing and creating print forms for contracts with clients
|
Module for storing and creating print forms for contracts.
|
||||||
""",
|
""",
|
||||||
"author": "RYDLAB",
|
"author": "RYDLAB",
|
||||||
"website": "http://rydlab.ru",
|
"website": "http://rydlab.ru",
|
||||||
"category": "Invoicing & Payments",
|
"category": "Invoicing & Payments",
|
||||||
"version": "0.2.0",
|
"version": "14.0.1.0.0",
|
||||||
"depends": ["base", "contacts", "hr", "russian_requisites", "sale", "sale_margin"],
|
"depends": ["base", "contacts", "hr", "l10n_ru", "sale", "sale_margin"],
|
||||||
|
"external_dependencies": {"python": ["docxtpl"]},
|
||||||
"data": [
|
"data": [
|
||||||
"data/assets_extension.xml",
|
"data/assets_extension.xml",
|
||||||
"data/fields_default.xml",
|
"data/fields_default.xml",
|
||||||
|
@ -67,7 +67,7 @@ class ResPartner(models.Model):
|
|||||||
)
|
)
|
||||||
record.full_address = ", ".join(data)
|
record.full_address = ", ".join(data)
|
||||||
|
|
||||||
@api.one
|
|
||||||
@api.depends("self.client_contract_ids")
|
@api.depends("self.client_contract_ids")
|
||||||
def _compute_contract_count(self):
|
def _compute_contract_count(self):
|
||||||
|
self.ensure_one()
|
||||||
self.contract_count = len(self.client_contract_ids)
|
self.contract_count = len(self.client_contract_ids)
|
||||||
|
@ -84,19 +84,15 @@ class PartnerContract(models.Model, IDocument, Extension):
|
|||||||
default="draft",
|
default="draft",
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def action_sign(self):
|
def action_sign(self):
|
||||||
self.write({"state": "sign", "date_conclusion": fields.Date.today()})
|
self.write({"state": "sign", "date_conclusion": fields.Date.today()})
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def action_close(self):
|
def action_close(self):
|
||||||
self.write({"state": "close"})
|
self.write({"state": "close"})
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def action_renew(self):
|
def action_renew(self):
|
||||||
self.write({"state": "draft"})
|
self.write({"state": "draft"})
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def action_print_form(self):
|
def action_print_form(self):
|
||||||
view = self.env.ref(
|
view = self.env.ref(
|
||||||
"{}.res_partner_wizard_print_document_view".format(MODULE_NAME)
|
"{}.res_partner_wizard_print_document_view".format(MODULE_NAME)
|
||||||
|
@ -93,7 +93,6 @@ class ContractOrderAnnex(models.Model, IDocument, Extension):
|
|||||||
string="Payment 3 Part (%)",
|
string="Payment 3 Part (%)",
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.multi
|
|
||||||
@api.depends("name")
|
@api.depends("name")
|
||||||
def _compute_display_name(self):
|
def _compute_display_name(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
@ -145,7 +144,6 @@ class ContractOrderAnnex(models.Model, IDocument, Extension):
|
|||||||
|
|
||||||
return record
|
return record
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def action_print_form(self):
|
def action_print_form(self):
|
||||||
view = self.env.ref(
|
view = self.env.ref(
|
||||||
"{}.res_partner_wizard_print_document_view".format(MODULE_NAME)
|
"{}.res_partner_wizard_print_document_view".format(MODULE_NAME)
|
||||||
|
@ -21,7 +21,6 @@ class SaleOrder(models.Model):
|
|||||||
domain=lambda self: [("id", "in", self._get_payment_terms())],
|
domain=lambda self: [("id", "in", self._get_payment_terms())],
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.multi
|
|
||||||
def _get_payment_terms(self):
|
def _get_payment_terms(self):
|
||||||
ref = self.env.ref
|
ref = self.env.ref
|
||||||
terms = (
|
terms = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user