Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC

This commit is contained in:
CI Publish Bot
2026-05-31 21:19:21 +00:00
commit aa4214c195
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1 @@
from . import models

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
{
"name": "Russian Contracts DOCX Templates",
"summary": "Связка договоров и DOCX-шаблонов для l10n_ru_contract",
"version": "19.0.1.0.0",
"category": "Accounting",
"author": "MK.Lab",
"depends": [
"web",
"l10n_ru_contract",
"docx_report",
],
"data": [
"views/partner_contract_customer_views.xml",
"views/contract_profile_views.xml",
],
"installable": True,
}

View File

@ -0,0 +1,2 @@
from . import partner_contract_customer
from . import contract_profile

View File

@ -0,0 +1,6 @@
from odoo import models
class ContractProfile(models.Model):
_name = 'contract.profile'
_inherit = ["contract.profile", "docx.template.mixin"]

View File

@ -0,0 +1,12 @@
from odoo import api, models
class PartnerContractCustomer(models.Model):
_name = "partner.contract.customer"
_inherit = ["partner.contract.customer", "docx.template.mixin"]
@api.onchange("profile_id")
def _onchange_profile_id_set_docx_template(self):
for rec in self:
if rec.profile_id and not rec.docx_template_id and rec.profile_id.docx_template_id:
rec.docx_template_id = rec.profile_id.docx_template_id

View File

@ -0,0 +1,18 @@
<odoo>
<record id="contract_profile_view_docx_template" model="ir.ui.view">
<field name="name">contract.profile.form.docx.template</field>
<field name="model">contract.profile</field>
<field name="inherit_id" ref="l10n_ru_contract.contract_profile_view"/>
<field name="arch" type="xml">
<xpath expr="//form/sheet" position="inside">
<notebook>
<page string="Шаблон DOCX">
<group>
<field name="docx_template_id"/>
</group>
</page>
</notebook>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,16 @@
<odoo>
<record id="contract_customer_form_docx_template" model="ir.ui.view">
<field name="name">contract.customer.form.docx.template</field>
<field name="model">partner.contract.customer</field>
<field name="inherit_id" ref="l10n_ru_contract.contract_customer_form"/>
<field name="arch" type="xml">
<xpath expr="//form/sheet/notebook" position="inside">
<page string="Шаблон DOCX">
<group>
<field name="docx_template_id"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>