work on offer template
This commit is contained in:
parent
570c4dd4ad
commit
8bc721271e
@ -359,6 +359,12 @@ mm = mm if mm // 10 else '0{}'.format(mm)
|
|||||||
|
|
||||||
# ctx keys must be declared in this xml with id equal to "contract_field_{technical_name}"
|
# ctx keys must be declared in this xml with id equal to "contract_field_{technical_name}"
|
||||||
ctx = {
|
ctx = {
|
||||||
|
# For manual filling on offer creation
|
||||||
|
"offer_subject": "",
|
||||||
|
"object_name": "",
|
||||||
|
"object_address": "",
|
||||||
|
|
||||||
|
# Fields from models
|
||||||
"offer_name": self.name,
|
"offer_name": self.name,
|
||||||
"offer_date": "{} {} {}".format(offer_date.day, months[offer_date.month], offer_date.year),
|
"offer_date": "{} {} {}".format(offer_date.day, months[offer_date.month], offer_date.year),
|
||||||
|
|
||||||
@ -498,7 +504,35 @@ action = ctx
|
|||||||
|
|
||||||
|
|
||||||
<!-- Offer fields -->
|
<!-- Offer fields -->
|
||||||
|
<!-- For manual filling -->
|
||||||
|
<record id="contract_field_offer_subject" model="res.partner.contract.field">
|
||||||
|
<field name="name">Offer subject</field>
|
||||||
|
<field name="technical_name">offer_subject</field>
|
||||||
|
<field name="description">
|
||||||
|
What we offers to our customer, i.e. 'power panels supply' or 'jobs execution and equipment supply'
|
||||||
|
</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="contract_field_object_name" model="res.partner.contract.field">
|
||||||
|
<field name="name">Object name</field>
|
||||||
|
<field name="technical_name">object_name</field>
|
||||||
|
<field name="description">
|
||||||
|
Object name this offer is made for
|
||||||
|
</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<record id="contract_field_object_address" model="res.partner.contract.field">
|
||||||
|
<field name="name">Object address</field>
|
||||||
|
<field name="technical_name">object_address</field>
|
||||||
|
<field name="description">
|
||||||
|
Object's address this offer is made for
|
||||||
|
</field>
|
||||||
|
<field name="sequence">1</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Filling from models -->
|
||||||
<record id="contract_field_offer_name" model="res.partner.contract.field">
|
<record id="contract_field_offer_name" model="res.partner.contract.field">
|
||||||
<field name="name">Offer name</field>
|
<field name="name">Offer name</field>
|
||||||
<field name="technical_name">offer_name</field>
|
<field name="technical_name">offer_name</field>
|
||||||
|
1561
i18n/client_contracts.pot
Normal file
1561
i18n/client_contracts.pot
Normal file
File diff suppressed because it is too large
Load Diff
23
i18n/ru.po
23
i18n/ru.po
@ -7,13 +7,15 @@ msgstr ""
|
|||||||
"Project-Id-Version: Odoo Server 11.0-20191106\n"
|
"Project-Id-Version: Odoo Server 11.0-20191106\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2020-03-18 13:42+0000\n"
|
"POT-Creation-Date: 2020-03-18 13:42+0000\n"
|
||||||
"PO-Revision-Date: 2020-03-18 13:42+0000\n"
|
"PO-Revision-Date: 2021-05-12 16:28+0500\n"
|
||||||
"Last-Translator: Stepan Savelyev\n"
|
"Last-Translator: Stepan Savelyev\n"
|
||||||
"Language-Team: RYDLAB\n"
|
"Language-Team: RYDLAB\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Plural-Forms: \n"
|
"Plural-Forms: \n"
|
||||||
|
"Language: ru\n"
|
||||||
|
"X-Generator: Poedit 2.4.3\n"
|
||||||
|
|
||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:ir.model.fields,field_description:client_contracts.field_res_partner_contract_count
|
#: model:ir.model.fields,field_description:client_contracts.field_res_partner_contract_count
|
||||||
@ -471,10 +473,6 @@ msgstr "Полный адрес"
|
|||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:res.partner.contract.field,description:client_contracts.contract_field_currency2words
|
#: model:res.partner.contract.field,description:client_contracts.contract_field_currency2words
|
||||||
#: model:res.partner.contract.field,description:client_contracts.contract_field_number2words
|
#: model:res.partner.contract.field,description:client_contracts.contract_field_number2words
|
||||||
msgid "Function"
|
|
||||||
msgstr "Функция"
|
|
||||||
|
|
||||||
#. module: client_contracts
|
|
||||||
#: model:res.partner.contract.field,name:client_contracts.contract_field_partner_representer_function
|
#: model:res.partner.contract.field,name:client_contracts.contract_field_partner_representer_function
|
||||||
#: model:res.partner.contract.field,name:client_contracts.contract_field_seller_representer_function
|
#: model:res.partner.contract.field,name:client_contracts.contract_field_seller_representer_function
|
||||||
msgid "Function"
|
msgid "Function"
|
||||||
@ -621,7 +619,7 @@ msgstr "Последнее обновление"
|
|||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:ir.ui.view,arch_db:client_contracts.res_partner_contract_annex_view_form
|
#: model:ir.ui.view,arch_db:client_contracts.res_partner_contract_annex_view_form
|
||||||
msgid "Leave empty for compute"
|
msgid "Leave empty for compute"
|
||||||
msgstr "Оставить пустым для автозаполнения..."
|
msgstr "Оставить пустым для автозаполнения"
|
||||||
|
|
||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:res.partner.contract.field,name:client_contracts.contract_field_MM
|
#: model:res.partner.contract.field,name:client_contracts.contract_field_MM
|
||||||
@ -715,7 +713,8 @@ msgstr "Имя заказа"
|
|||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:ir.model.fields,help:client_contracts.field_res_partner_contract_annex_order_id
|
#: model:ir.model.fields,help:client_contracts.field_res_partner_contract_annex_order_id
|
||||||
msgid "Orders with this partner which are not uses in annexes yet"
|
msgid "Orders with this partner which are not uses in annexes yet"
|
||||||
msgstr "Заказы, заключённые с этим партнёром и ещё не использующиеся в приложениях"
|
msgstr ""
|
||||||
|
"Заказы, заключённые с этим партнёром и ещё не использующиеся в приложениях"
|
||||||
|
|
||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:res.partner.contract.field,name:client_contracts.contract_field_partner_ogrn
|
#: model:res.partner.contract.field,name:client_contracts.contract_field_partner_ogrn
|
||||||
@ -1049,8 +1048,12 @@ msgstr "Шаблоны"
|
|||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: code:addons/client_contracts/models/account_invoice.py:20
|
#: code:addons/client_contracts/models/account_invoice.py:20
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "There is no binding contract. It is necessary to link the order with the annex to the contract."
|
msgid ""
|
||||||
msgstr "Отсутствует связанный договор. Необходимо связать заказ с приложением к договору."
|
"There is no binding contract. It is necessary to link the order with the "
|
||||||
|
"annex to the contract."
|
||||||
|
msgstr ""
|
||||||
|
"Отсутствует связанный договор. Необходимо связать заказ с приложением к "
|
||||||
|
"договору."
|
||||||
|
|
||||||
#. module: client_contracts
|
#. module: client_contracts
|
||||||
#: model:ir.model.fields,help:client_contracts.field_res_partner_name_write
|
#: model:ir.model.fields,help:client_contracts.field_res_partner_name_write
|
||||||
|
@ -52,7 +52,7 @@ class ResPartner(models.Model):
|
|||||||
@api.depends("street", "street2", "city", "state_id", "zip", "country_id")
|
@api.depends("street", "street2", "city", "state_id", "zip", "country_id")
|
||||||
def _compute_full_address(self):
|
def _compute_full_address(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
data = filter(
|
address_data = filter(
|
||||||
None,
|
None,
|
||||||
map(
|
map(
|
||||||
lambda s: s and s.strip(),
|
lambda s: s and s.strip(),
|
||||||
@ -60,12 +60,12 @@ class ResPartner(models.Model):
|
|||||||
record.zip,
|
record.zip,
|
||||||
record.street,
|
record.street,
|
||||||
record.street2,
|
record.street2,
|
||||||
record.country_id.name,
|
|
||||||
record.city,
|
record.city,
|
||||||
|
record.country_id.l10n_ru_short_name or record.country_id.name,
|
||||||
],
|
],
|
||||||
),
|
|
||||||
)
|
)
|
||||||
record.full_address = ", ".join(data)
|
)
|
||||||
|
record.full_address = ", ".join(address_data)
|
||||||
|
|
||||||
@api.depends("self.client_contract_ids")
|
@api.depends("self.client_contract_ids")
|
||||||
def _compute_contract_count(self):
|
def _compute_contract_count(self):
|
||||||
|
BIN
Шаблон_КП.docx
Normal file
BIN
Шаблон_КП.docx
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user