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,2 @@
# -*- coding: utf-8 -*-
from . import report_contract

View File

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
from odoo import api, models
class ContractCustomerReport(models.AbstractModel):
_name = 'contract.customer.report'
def get_report_values(self, docids, data=None):
docs = self.env['partner.contract.customer'].browse(docids)
return {
'doc_ids': docs.ids,
'doc_model': 'partner.contract.customer',
'docs': docs,
}

View File

@ -0,0 +1,398 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="paperformat_a4" model="report.paperformat">
<field name="name">A4</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">15</field>
<field name="margin_bottom">30</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">10</field>
<field name="dpi">90</field>
</record>
<record id="action_report_contract_customer" model="ir.actions.report">
<field name="name">Договор</field>
<field name="model">partner.contract.customer</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_ru_contract.report_contract_customer</field>
<field name="report_file">l10n_ru_contract.report_contract_customer</field>
<field name="print_report_name">'Договор - %s' % (object.name)</field>
<field name="binding_model_id" ref="l10n_ru_contract.model_partner_contract_customer" />
<field name="paperformat_id" ref="paperformat_a4" />
<field name="binding_type">report</field>
</record>
<template id="report_contract_customer">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-set="context" t-value="o._context"/>
<div class="header">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C0">
<t t-esc="o.company_id.name or ''"/>
</td>
<td class="R0C1">Договор
<t t-esc="o.name or ''"/>
от
<t
t-esc="o.date_start or ''"/>
</td>
</tr>
</tbody>
</table>
</div>
<div class="page">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: center; vertical-align: medium;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium;}
tr.R0 td.R0C2{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium;}
tr.R0 td.R0C3{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium; margin: 40px;}
p.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align: center;
vertical-align: medium; font-weight: bold;}
div.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium;}
tr.R0 td.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium;}
tr.R0 td.R0C6rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-top: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C6rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid; border-right:
#000000 1px solid}
tr.R0 td.R0C6r{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-right: #000000 1px solid}
tr.R0 td.R0C6l{ font-family: Times new roman; font-size: 11pt; font-style: normal;
text-align: left; vertical-align: medium; border-left: #000000 1px solid;}
tr.R0 td.R0C6b{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-top: #000000 1px solid;}
tr.R0 td.R0C6t{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-top: #000000 1px solid;}
tr.R0 td.R0C6rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-right: #000000 1px solid; border-bottom: #000000 1px solid;}
tr.R0 td.R0C7rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-top: #000000 1px solid;
border-right: #000000 1px solid;}
tr.R0 td.R0C7rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C7rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -30px; left: 80px; }
tr.R0 td.R0C6tS { overflow: visible; }
tr.R0 td.R0C6tS span { position: relative; }
tr.R0 td.R0C6tS span img { position: absolute; width: 140px; top: -40px; left: -200px; }
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: auto;">
<tbody>
<tr class="R0">
<td class="R0C0" colspan="2">Договор №
<t t-esc="o.name"/>
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="2">на поставку продукции</td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
<tr class="R0">
<td class="R0C1">
<t t-esc="company.partner_id.city"/>
</td>
<td class="R0C2">
<t t-esc="o.get_date_text(o.date_start)"/>
</td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
<tr class="R0">
<td class="R0C3" colspan="2">
<span>
<t t-raw="o.contract_header or ''"/>
</span>
</td>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
</tr>
<!--t t-foreach="o.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<tr class="R0">
<td class="R0C4" colspan="2"><t t-esc="line.name"/></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="2"><span><t t-raw="line.punct"/></span></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="2"></td>
</tr>
</t-->
</tbody>
</table>
<t t-foreach="o.lines_ids.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<p class="R0C4">
<t t-esc="line.name or ''"/>
</p>
<div class="R0C5">
<span>
<t t-raw="line.punct or ''"/>
</span>
</div>
</t>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: avoid;">
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<tbody>
<tr class="R0">
<td class="R0C4" colspan="6">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="6"></td>
</tr>
<tr class="R0">
<td class="R0C6rtl" colspan="3">Поставщик:</td>
<td class="R0C6rtl" colspan="3">Покупатель:</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3">
<t t-esc="o.company_id.name or ''"/>
</td>
<td class="R0C6rl" colspan="3">
<t t-esc="o.partner_id.name or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">ИНН
<t t-esc="o.company_id.inn or ''"/>
</td>
<td class="R0C7rl" colspan="3">ИНН
<t t-esc="o.partner_id.inn or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="2">ОГРН
<t t-esc="o.company_id.company_registry or ''"/>
</td>
<td class="R0C6r" rowspan="2">
<t t-esc="o.director_name_company or ''"/>
</td>
<t t-if="o.partner_type in ['company', 'company_ip']">
<td class="R0C7rl" colspan="3">ОГРН
<t t-esc="o.partner_id.ogrn or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3">Паспорт
<t t-esc="o.partner_id.passport or ''"/>
</td>
</t>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">КПП
<t t-esc="o.company_id.kpp or ''"/>
</td>
<t t-if="o.partner_type == 'company'">
<td class="R0C7rl" colspan="3">КПП
<t t-esc="o.partner_id.kpp or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3"></td>
</t>
</tr>
<!-- <tr class="R0">-->
<!-- <td class="R0C6rl" colspan="3">Расчетный счет:</td>-->
<!-- <td class="R0C6rl" colspan="3">Расчетный счет:</td>-->
<!-- </tr>-->
<!-- <tr class="R0">-->
<!-- <td class="R0C6l" colspan="3">-->
<!-- <t t-raw="o.get_bank(o.company_id.partner_id) or ''"/>-->
<!-- </td>-->
<!-- <td class="R0C7rl" colspan="3">-->
<!-- <t t-raw="o.get_bank(o.partner_id) or ''"/>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <td class="R0C6tI">-->
<!-- <SPAN>-->
<!-- <t-->
<!-- t-raw="o.stamp and o.img(company.chief_id.facsimile) or ''"/>-->
<!-- </SPAN>-->
<!-- </td>-->
<tr class="R0">
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">
<t t-esc="o.address(o.company_id) or ''"/>
</td>
<td class="R0C7rl" colspan="3">
<t t-esc="o.address(o.partner_id) or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6l"></td>
<td class="R0C6tI">
<SPAN>
<t t-raw="o.stamp and o.img(o.company_id.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C6tS">
<SPAN>
<t t-raw="o.stamp and o.img(o.company_id.stamp) or ''"/>
</SPAN>
</td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6l"></td>
<td class="R0C6b"></td>
<td class="R0C6r">
<t t-esc="''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rbl" colspan="3"></td>
<td class="R0C6rbl" colspan="3"></td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 30px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: bottom;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: right; vertical-align: bottom;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: top; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -5px; left: 5px;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<tbody>
<tr class="R0">
<td class="R0C0">Подпись Исполнителя</td>
<td class="R0C6tI">
<SPAN>
<t
t-raw="o.stamp and o.img(company.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C0"></td>
<td class="R0C1">Подпись Заказчика</td>
<td class="R0C6tI"></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-3 pull-right">
<small style="font-size:18px;">
<span>Страница</span>
<span class="page"/>
из
<span class="topage"/>
</small>
</div>
</div>
</div>
</t>
</t>
</template>
</odoo>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="action_contract_generate_docx" model="ir.actions.server">
<field name="name">Договор DOCX</field>
<field name="model_id" ref="l10n_ru_contract.model_partner_contract_customer"/>
<field name="binding_model_id" ref="l10n_ru_contract.model_partner_contract_customer"/>
<field name="state">code</field>
<field name="code">
action = records.action_report_contract_with_format('docx')
</field>
<field name="binding_type">action</field>
</record>
<record id="action_contract_generate_md" model="ir.actions.server">
<field name="name">Договор MD</field>
<field name="model_id" ref="l10n_ru_contract.model_partner_contract_customer"/>
<field name="binding_model_id" ref="l10n_ru_contract.model_partner_contract_customer"/>
<field name="state">code</field>
<field name="code">
action = records.action_report_contract_with_format('md')
</field>
<field name="binding_type">action</field>
</record>
</odoo>

View File

@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
from odoo import api, models
class ContractCustomerReportInvoice(models.AbstractModel):
_name = 'contract.customer.report_invoice'
def get_report_values(self, docids, data=None):
docs = self.env['account.move'].browse(docids)
return {
'doc_ids': docs.ids,
'doc_model': 'account.move',
'docs': docs,
}

View File

@ -0,0 +1,592 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="report_contract_customer_invoice">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-set="context" t-value="o._context"/>
<div class="header">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C0"><t t-esc="o.mt_contract_id.company_id.name or ''"/></td>
<td class="R0C1">Договор <t t-esc="o.mt_contract_id.name or ''"/> от <t
t-esc="o.mt_contract_id.date_start or ''"/></td>
</tr>
</tbody>
</table>
</div>
<div class="page">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: center; vertical-align: medium;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium;}
tr.R0 td.R0C2{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium;}
tr.R0 td.R0C3{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium; margin: 40px;}
tr.R0 td.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
start; vertical-align: medium;}
p.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align: center;
vertical-align: medium; font-weight: bold;}
div.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium;}
tr.R0 td.R0C6rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-top: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C6rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid; border-right:
#000000 1px solid}
tr.R0 td.R0C6r{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-right: #000000 1px solid}
tr.R0 td.R0C6l{ font-family: Times new roman; font-size: 11pt; font-style: normal;
text-align: left; vertical-align: medium; border-left: #000000 1px solid;}
tr.R0 td.R0C6b{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6t{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-top: #000000 1px solid;}
tr.R0 td.R0C6rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-right: #000000 1px solid; border-bottom: #000000 1px solid;}
tr.R0 td.R0C7rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-top: #000000 1px solid;
border-right: #000000 1px solid;}
tr.R0 td.R0C7rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C7rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -30px; left: 80px; }
tr.R0 td.R0C6tS { overflow: visible; }
tr.R0 td.R0C6tS span { position: relative; }
tr.R0 td.R0C6tS span img { position: absolute; width: 140px; top: -40px; left: -200px; }
tr.R0 td.R0C8{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C9box{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid; border-top: #000000 1px solid;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: auto;">
<tbody>
<tr class="R0">
<td class="R0C0" colspan="2">Договор № <t t-esc="o.mt_contractid.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="2">на поставку продукции</td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
<tr class="R0">
<td class="R0C1"><t t-esc="o.mt_contractid.company_id.partner_id.city or ''"/></td>
<td class="R0C2"><t
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
<tr class="R0">
<td class="R0C3" colspan="2">
<span>
<t t-raw="o.mt_contractid.contract_header or ''"/>
</span>
</td>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
</tr>
<!--t t-foreach="o.mt_contractid.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<tr class="R0">
<td class="R0C4" colspan="2"><t t-esc="line.name"/></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="2"><t t-raw="line.punct"/></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="2"></td>
</tr>
</t-->
<!--tr class="R0">
<td class="R0C4" colspan="2">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr-->
</tbody>
</table>
<t t-foreach="o.mt_contractid.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<p class="R0C4"><t t-esc="line.name or ''"/></p>
<div class="R0C5"><span><t t-raw="line.punct or ''"/></span></div>
</t>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: avoid;">
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<tbody>
<tr class="R0">
<td class="R0C4" colspan="6">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="6"></td>
</tr>
<tr class="R0">
<td class="R0C6rtl" colspan="3">Поставщик:</td>
<td class="R0C6rtl" colspan="3">Покупатель:</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contractid.company_id.name or ''"/></td>
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contractid.partner_id.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">ИНН
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
</td>
<td class="R0C7rl" colspan="3">ИНН <t
t-esc="o.mt_contractid.partner_id.inn or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="2">ОГРН
<t t-esc="o.company_id.company_registry or ''"/>
</td>
<td class="R0C6r" rowspan="2">
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
</td>
<t t-if="o.mt_contractid.partner_type in ['company', 'company_ip']">
<td class="R0C7rl" colspan="3">ОГРН
<t t-esc="o.partner_id.ogrn or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3">Паспорт
<t t-esc="o.partner_id.passport or ''"/>
</td>
</t>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">КПП
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
</td>
<t t-if="o.mt_contractid.partner_type == 'company'">
<td class="R0C7rl" colspan="3">КПП
<t t-esc="o.partner_id.kpp or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3"></td>
</t>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
</td>
<td class="R0C7rl" colspan="3">
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6l"></td>
<td class="R0C6tI">
<SPAN>
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C6tS">
<SPAN>
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
</SPAN>
</td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6l"></td>
<td class="R0C6b"></td>
<td class="R0C6r">
<t t-esc="''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rbl" colspan="3"></td>
<td class="R0C6rbl" colspan="3"></td>
</tr>
</tbody>
</table>
<p style="page-break-before:always;"></p>
<!--p style="page-break-after:always"></p>
<div style="page-break-after: auto;"><span style="display: none;"> </span></div>
<p style="page-break-inside: avoid">
<div style="page-break-inside: auto"></div-->
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C8" colspan="8">Приложение<br/>к договору № <t
t-esc="o.mt_contractid.name"/><br/>на поставку продукции<br/>от <t
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8">Спецификация № 1</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="4"><t
t-esc="o.mt_contractid.company_id.partner_id.city or ''"/></td>
<td class="R0C2" colspan="4"><t
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C3" colspan="8">
<span>
<t t-raw="o.mt_contractid.contract_header or ''"/>
</span>
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="8">1. По договору на поставку продукции <t
t-esc="o.mt_contractid.name or ''"/> от <t
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_start) or ''"/>.
Поставщик обязуется поставить, а Покупатель оплатить в полном объеме следующее:</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C9box">Номенклатура</td>
<!-- <td class="R0C9box">*ГОСТ</td>-->
<td class="R0C9box">Ед.изм.</td>
<td class="R0C9box">Кол-во</td>
<td class="R0C9box">Цена/руб.<br/>без НДС</td>
<td class="R0C9box">Стоимость/руб.<br/>без НДС</td>
<!-- <td class="R0C9box">НДС</td>-->
<!-- <td class="R0C9box">Стоимость/руб.<br/>c НДС</td>-->
</tr>
<t t-set="invoice_line_ids" t-value="o.invoice_line_ids.filtered(lambda s: 'аванс' not in s.name.lower() and 'депозит' not in s.name.lower())"/>
<t t-set="quantity" t-value="sum([line.quantity for line in invoice_line_ids])"/>
<t t-set="sum_full"
t-value="sum([line.quantity*line.price_unit for line in invoice_line_ids])"/>
<t t-set="sum_nds"
t-value="sum([line.quantity*line.price_unit*1.2 for line in invoice_line_ids])"/>
<tr class="R0" t-foreach="invoice_line_ids" t-as="line">
<td class="R0C9box"><t t-esc="line.product_id.name or ''"/></td>
<!-- <td class="R0C9box">&lt;!&ndash;ГОСТ&ndash;&gt;</td>-->
<td class="R0C9box"><t t-esc="line.product_id.uom_id.name or ''"/></td>
<td class="R0C9box"><t t-esc="line.quantity or ''"/></td>
<td class="R0C9box"><t t-esc="line.price_unit or ''"/></td>
<td class="R0C9box"><t t-esc="line.price_unit*line.quantity or ''"/></td>
<!-- <td class="R0C9box">20%</td>-->
<!-- <td class="R0C9box"><t t-esc="line.price_unit*line.quantity*1.2 or ''"/></td>-->
</tr>
<tr class="R0">
<td></td>
<!-- <td></td>-->
<td>ИТОГО</td>
<td class="R0C9box"><t t-esc="quantity or ''"/></td>
<td class="R0C9box">x</td>
<td class="R0C9box"><t t-esc="sum_full or ''"/></td>
<!-- <td class="R0C9box">x</td>-->
<!-- <td class="R0C9box"><t t-esc="sum_nds or ''"/></td>-->
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="8">Итого: <t t-esc="sum_full or ''"/> рублей (<t
t-esc="o.mt_contractid.rubles(sum_full) or ''"/>). В стоимость продукции входит стоимость
тары и стоимость транспортных расходов, связанных с доставкой продукции до станции
назначения.<br/>
2. Базис поставки (пункт назначения) по отгрузочным реквизитам:<br/>
<t t-esc="o.mt_contractid.address_delivery(o.mt_contractid.partner_id.id) or ''"/><br/>
Грузополучатель: <t t-esc="o.mt_contractid.partner_id.name or ''"/>, код <t
t-esc="o.mt_contractid.partner_id.id or ''"/>, ОКПО <t
t-esc="o.mt_contractid.partner_id.okpo or ''"/>.<br/>
3. Условия оплаты: <t t-esc="o.invoice_payment_term_id.name or ''"/> согласно
выставленному счету Поставщика.<br/>
4. Срок отгрузки: <t
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_end) or ''"/><br/>
5. Срок действия настоящей спецификации ограничен и равен сроку отгрузки по условиям
данной спецификации.
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: avoid;">
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<tbody>
<tr class="R0">
<td class="R0C4" colspan="6">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="6"></td>
</tr>
<tr class="R0">
<td class="R0C6rtl" colspan="3">Поставщик:</td>
<td class="R0C6rtl" colspan="3">Покупатель:</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contractid.company_id.name or ''"/></td>
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contractid.partner_id.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">ИНН
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
</td>
<td class="R0C7rl" colspan="3">ИНН <t
t-esc="o.mt_contractid.partner_id.inn or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="2">ОГРН
<t t-esc="o.company_id.company_registry or ''"/>
</td>
<td class="R0C6r" rowspan="2">
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
</td>
<t t-if="o.mt_contractid.partner_type in ['company', 'company_ip']">
<td class="R0C7rl" colspan="3">ОГРН
<t t-esc="o.partner_id.ogrn or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3">Паспорт
<t t-esc="o.partner_id.passport or ''"/>
</td>
</t>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">КПП
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
</td>
<t t-if="o.mt_contractid.partner_type == 'company'">
<td class="R0C7rl" colspan="3">КПП
<t t-esc="o.partner_id.kpp or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3"></td>
</t>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
</td>
<td class="R0C7rl" colspan="3">
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6l"></td>
<td class="R0C6tI">
<SPAN>
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C6tS">
<SPAN>
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
</SPAN>
</td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6l"></td>
<td class="R0C6b"></td>
<td class="R0C6r">
<t t-esc="''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rbl" colspan="3"></td>
<td class="R0C6rbl" colspan="3"></td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 30px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: bottom;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: right; vertical-align: bottom;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: top; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -5px; left: 5px;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<tbody>
<tr class="R0">
<td class="R0C0">Подпись Исполнителя</td>
<td class="R0C6tI">
<SPAN>
<t
t-raw="o.stamp and o.mt_contractid.img(company.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C0"></td>
<td class="R0C1">Подпись Заказчика</td>
<td class="R0C6tI"></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-3 pull-right">
<small style="font-size:18px;">
<span>Страница</span>
<span class="page"/>
из
<span class="topage"/>
</small>
</div>
</div>
</div>
</t>
</t>
</template>
<record id="paperformat_a4" model="report.paperformat">
<field name="name">A4</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">15</field>
<field name="margin_bottom">30</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">10</field>
<field name="dpi">90</field>
</record>
<record id="action_report_contract_customer_invoce" model="ir.actions.report">
<field name="name">Договор со спецификацией</field>
<field name="model">account.move</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_ru_contract.report_contract_customer_invoice</field>
<field name="report_file">l10n_ru_contract.report_contract_customer_invoice</field>
<field name="print_report_name">'Договор со спецификацией - %s' % (object.name)</field>
<field name="binding_model_id" ref="account.model_account_move" />
<field name="paperformat_id" ref="paperformat_a4" />
<field name="binding_type">report</field>
</record>
</odoo>

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from odoo import api, models
class ContractCustomerReportOrder(models.AbstractModel):
_name = 'contract.customer.report_order'
def get_report_values(self, docids, data=None):
docs = self.env['sale.order'].browse(docids)
return {
'doc_ids': docs.ids,
'doc_model': 'sale.order',
'docs': docs,
}

View File

@ -0,0 +1,594 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="report_contract_customer_order">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-set="context" t-value="o._context"/>
<div class="header">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C0"><t t-esc="o.mt_contract_id.company_id.name or ''"/></td>
<td class="R0C1">Договор <t t-esc="o.mt_contract_id.name or ''"/> от <t
t-esc="o.mt_contract_id.date_start or ''"/></td>
</tr>
</tbody>
</table>
</div>
<div class="page">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: center; vertical-align: medium;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium;}
tr.R0 td.R0C2{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium;}
tr.R0 td.R0C3{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium; margin: 40px;}
tr.R0 td.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
start; vertical-align: medium;}
p.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align: center;
vertical-align: medium; font-weight: bold;}
div.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium;}
tr.R0 td.R0C6rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-top: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C6rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid; border-right:
#000000 1px solid}
tr.R0 td.R0C6r{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-right: #000000 1px solid}
tr.R0 td.R0C6l{ font-family: Times new roman; font-size: 11pt; font-style: normal;
text-align: left; vertical-align: medium; border-left: #000000 1px solid;}
tr.R0 td.R0C6b{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6t{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-top: #000000 1px solid;}
tr.R0 td.R0C6rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-right: #000000 1px solid; border-bottom: #000000 1px solid;}
tr.R0 td.R0C7rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-top: #000000 1px solid;
border-right: #000000 1px solid;}
tr.R0 td.R0C7rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C7rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -30px; left: 80px; }
tr.R0 td.R0C6tS { overflow: visible; }
tr.R0 td.R0C6tS span { position: relative; }
tr.R0 td.R0C6tS span img { position: absolute; width: 140px; top: -40px; left: -200px; }
tr.R0 td.R0C8{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C9box{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid; border-top: #000000 1px solid;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%;">
<tbody>
<tr class="R0">
<td class="R0C0" colspan="2">Договор № <t t-esc="o.mt_contract_id.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="2">на поставку продукции</td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
<tr class="R0">
<td class="R0C1"><t t-esc="o.mt_contract_id.company_id.partner_id.city or ''"/></td>
<td class="R0C2"><t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
<tr class="R0">
<td class="R0C3" colspan="2">
<span>
<t t-raw="o.mt_contract_id.contract_header or ''"/>
</span>
</td>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr>
</tr>
<!--t t-foreach="o.mt_contract_id.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<tr class="R0">
<td class="R0C4" colspan="2"><t t-esc="line.name"/></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="2"><t t-raw="line.punct"/></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="2"></td>
</tr>
</t-->
<!--tr class="R0">
<td class="R0C4" colspan="2">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1"></td>
<td class="R0C2"></td>
</tr-->
</tbody>
</table>
<t t-foreach="o.mt_contract_id.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<p class="R0C4"><t t-esc="line.name or ''"/></p>
<div class="R0C5"><span><t t-raw="line.punct or ''"/></span></div>
</t>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: avoid;">
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<tbody>
<tr class="R0">
<td class="R0C4" colspan="6">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="6"></td>
</tr>
<tr class="R0">
<td class="R0C6rtl" colspan="3">Поставщик:</td>
<td class="R0C6rtl" colspan="3">Покупатель:</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contract_id.company_id.name or ''"/></td>
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contract_id.partner_id.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">ИНН
<t t-esc="o.mt_contract_id.company_id.inn or ''"/>
</td>
<td class="R0C7rl" colspan="3">ИНН <t
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="2">ОГРН
<t t-esc="o.company_id.company_registry or ''"/>
</td>
<td class="R0C6r" rowspan="2">
<t t-esc="o.mt_contract_id.name_dirprint1 or ''"/>
</td>
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
<td class="R0C7rl" colspan="3">ОГРН
<t t-esc="o.partner_id.ogrn or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3">Паспорт
<t t-esc="o.partner_id.passport or ''"/>
</td>
</t>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">КПП
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
</td>
<t t-if="o.mt_contract_id.partner_type == 'company'">
<td class="R0C7rl" colspan="3">КПП
<t t-esc="o.partner_id.kpp or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3"></td>
</t>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
</td>
<td class="R0C7rl" colspan="3">
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6l"></td>
<td class="R0C6tI">
<SPAN>
<t t-raw="o.stamp and o.mt_contract_id.img(o.company_id.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C6tS">
<SPAN>
<t t-raw="o.stamp and o.mt_contract_id.img(o.company_id.stamp) or ''"/>
</SPAN>
</td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6l"></td>
<td class="R0C6b"></td>
<td class="R0C6r">
<t t-esc="''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rbl" colspan="3"></td>
<td class="R0C6rbl" colspan="3"></td>
</tr>
</tbody>
</table>
<p style="page-break-before:always;"></p>
<!--p style="page-break-after:always"></p>
<div style="page-break-after: auto;"><span style="display: none;"> </span></div>
<p style="page-break-inside: avoid">
<div style="page-break-inside: auto"></div-->
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C8" colspan="8">Приложение<br/>к договору № <t
t-esc="o.mt_contract_id.name"/><br/>на поставку продукции<br/>от <t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8">Спецификация № 1</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="4"><t
t-esc="o.mt_contract_id.company_id.partner_id.city or ''"/></td>
<td class="R0C2" colspan="4"><t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C3" colspan="8">
<span>
<t t-raw="o.mt_contract_id.contract_header or ''"/>
</span>
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="8">1. По договору на поставку продукции <t
t-esc="o.mt_contract_id.name or ''"/> от <t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/>.
Поставщик обязуется поставить, а Покупатель оплатить в полном объеме следующее:</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C9box">Номенклатура</td>
<!-- <td class="R0C9box">*ГОСТ</td>-->
<td class="R0C9box">Ед.изм.</td>
<td class="R0C9box">Кол-во</td>
<td class="R0C9box">Цена/руб.<br/>без НДС</td>
<td class="R0C9box">Стоимость/руб.<br/>без НДС</td>
<!-- <td class="R0C9box">НДС</td>-->
<!-- <td class="R0C9box">Стоимость/руб.<br/>c НДС</td>-->
</tr>
<t t-set="order_line" t-value="o.order_line.filtered(lambda s: 'аванс' not in s.name.lower() and 'депозит' not in s.name.lower())"/>
<t t-set="quantity" t-value="sum([line.product_uom_qty for line in order_line])"/>
<t t-set="sum_full"
t-value="sum([line.product_uom_qty*line.price_unit for line in order_line])"/>
<t t-set="sum_nds"
t-value="sum([line.product_uom_qty*line.price_unit*1.2 for line in order_line])"/>
<tr class="R0" t-foreach="order_line" t-as="line">
<td class="R0C9box"><t t-esc="line.product_id.name or ''"/></td>
<!-- <td class="R0C9box">&lt;!&ndash;ГОСТ&ndash;&gt;</td>-->
<td class="R0C9box"><t t-esc="line.product_id.uom_id.name or ''"/></td>
<td class="R0C9box"><t t-esc="line.product_uom_qty or ''"/></td>
<td class="R0C9box"><t t-esc="line.price_unit or ''"/></td>
<td class="R0C9box"><t t-esc="line.price_unit*line.product_uom_qty or ''"/></td>
<!-- <td class="R0C9box">20%</td>-->
<!-- <td class="R0C9box"><t t-esc="line.price_unit*line.product_uom_qty*1.2 or ''"/></td>-->
</tr>
<tr class="R0">
<td></td>
<!-- <td></td>-->
<td>ИТОГО</td>
<td class="R0C9box"><t t-esc="quantity or ''"/></td>
<td class="R0C9box">x</td>
<td class="R0C9box"><t t-esc="sum_full or ''"/></td>
<!-- <td class="R0C9box">x</td>-->
<!-- <td class="R0C9box"><t t-esc="sum_nds or ''"/></td>-->
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="9">Итого: <t t-esc="sum_full or ''"/> рублей (<t
t-esc="o.mt_contract_id.rubles(sum_full) or ''"/>). В стоимость продукции входит
стоимость
тары и стоимость транспортных расходов, связанных с доставкой продукции до станции
назначения.<br/>
2. Базис поставки (пункт назначения) по отгрузочным реквизитам:<br/>
<t t-esc="o.mt_contract_id.address_delivery(o.mt_contract_id.partner_id.id) or ''"/><br/>
Грузополучатель: <t t-esc="o.mt_contract_id.partner_id.name or ''"/>, код <t
t-esc="o.mt_contract_id.partner_id.id or ''"/>, ОКПО <t
t-esc="o.mt_contract_id.partner_id.okpo or ''"/>.<br/>
3. Условия оплаты: <t t-esc="o.payment_term_id.name or ''"/> согласно выставленному
счету
Поставщика.<br/>
4. Срок отгрузки: <t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_end) or ''"/>
<br/>
5. Срок действия настоящей спецификации ограничен и равен сроку отгрузки по
условиям данной спецификации.
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: avoid;">
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<tbody>
<tr class="R0">
<td class="R0C4" colspan="6">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="6"></td>
</tr>
<tr class="R0">
<td class="R0C6rtl" colspan="3">Поставщик:</td>
<td class="R0C6rtl" colspan="3">Покупатель:</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contract_id.company_id.name or ''"/></td>
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contract_id.partner_id.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">ИНН
<t t-esc="o.mt_contract_id.company_id.inn or ''"/>
</td>
<td class="R0C7rl" colspan="3">ИНН <t
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="2">ОГРН
<t t-esc="o.company_id.company_registry or ''"/>
</td>
<td class="R0C6r" rowspan="2">
<t t-esc="o.mt_contract_id.name_dirprint1 or ''"/>
</td>
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
<td class="R0C7rl" colspan="3">ОГРН
<t t-esc="o.partner_id.ogrn or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3">Паспорт
<t t-esc="o.partner_id.passport or ''"/>
</td>
</t>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">КПП
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
</td>
<t t-if="o.mt_contract_id.partner_type == 'company'">
<td class="R0C7rl" colspan="3">КПП
<t t-esc="o.partner_id.kpp or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3"></td>
</t>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
</td>
<td class="R0C7rl" colspan="3">
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6l"></td>
<td class="R0C6tI">
<SPAN>
<t t-raw="o.stamp and o.mt_contract_id.img(o.company_id.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C6tS">
<SPAN>
<t t-raw="o.stamp and o.mt_contract_id.img(o.company_id.stamp) or ''"/>
</SPAN>
</td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6l"></td>
<td class="R0C6b"></td>
<td class="R0C6r">
<t t-esc="''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rbl" colspan="3"></td>
<td class="R0C6rbl" colspan="3"></td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 30px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: bottom;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: right; vertical-align: bottom;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: top; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -5px; left: 5px;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<tbody>
<tr class="R0">
<td class="R0C0">Подпись Исполнителя</td>
<td class="R0C6tI">
<SPAN>
<t
t-raw="o.stamp and o.mt_contract_id.img(company.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C0"></td>
<td class="R0C1">Подпись Заказчика</td>
<td class="R0C6tI"></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-3 pull-right">
<small style="font-size:18px;">
<span>Страница</span>
<span class="page"/>
из
<span class="topage"/>
</small>
</div>
</div>
</div>
</t>
</t>
</template>
<record id="paperformat_a4" model="report.paperformat">
<field name="name">A4</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">15</field>
<field name="margin_bottom">30</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">10</field>
<field name="dpi">90</field>
</record>
<record id="action_report_contract_customer_order" model="ir.actions.report">
<field name="name">Договор со спецификацией</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_ru_contract.report_contract_customer_order</field>
<field name="report_file">l10n_ru_contract.report_contract_customer_order</field>
<field name="print_report_name">'Договор со спецификацией - %s' % (object.name)</field>
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="paperformat_id" ref="paperformat_a4" />
<field name="binding_type">report</field>
</record>
</odoo>

View File

@ -0,0 +1,406 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<template id="report_contract_customer_order1">
<t t-call="web.basic_layout">
<t t-foreach="docs" t-as="o">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-set="context" t-value="o._context"/>
<div class="header">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C0"><t t-esc="o.mt_contract_id.company_id.name or ''"/></td>
<td class="R0C1">Договор <t t-esc="o.mt_contract_id.name or ''"/> от <t
t-esc="o.mt_contract_id.date_start or ''"/></td>
</tr>
</tbody>
</table>
</div>
<div class="page">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 15px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: center; vertical-align: medium;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium;}
tr.R0 td.R0C2{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium;}
tr.R0 td.R0C3{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium; margin: 40px;}
tr.R0 td.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
start; vertical-align: medium;}
p.R0C4{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align: center;
vertical-align: medium; font-weight: bold;}
div.R0C5{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
justify; vertical-align: medium;}
tr.R0 td.R0C6rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-top: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C6rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid; border-right:
#000000 1px solid}
tr.R0 td.R0C6r{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-right: #000000 1px solid}
tr.R0 td.R0C6l{ font-family: Times new roman; font-size: 11pt; font-style: normal;
text-align: left; vertical-align: medium; border-left: #000000 1px solid;}
tr.R0 td.R0C6b{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6t{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-top: #000000 1px solid;}
tr.R0 td.R0C6rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal;
font-weight: bold; text-align: left; vertical-align: medium; border-left: #000000 1px solid;
border-right: #000000 1px solid; border-bottom: #000000 1px solid;}
tr.R0 td.R0C7rtl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-top: #000000 1px solid;
border-right: #000000 1px solid;}
tr.R0 td.R0C7rl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;}
tr.R0 td.R0C7rbl{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
left; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: medium; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -30px; left: 80px; }
tr.R0 td.R0C6tS { overflow: visible; }
tr.R0 td.R0C6tS span { position: relative; }
tr.R0 td.R0C6tS span img { position: absolute; width: 140px; top: -40px; left: -200px; }
tr.R0 td.R0C8{ font-family: Times new roman; font-size: 11pt; font-style: normal; text-align:
right; vertical-align: medium; font-weight: bold;}
tr.R0 td.R0C9box{ font-family: Times new roman; font-size: 12pt; font-style: normal; text-align:
center; vertical-align: medium; border-left: #000000 1px solid; border-right: #000000 1px solid;
border-bottom: #000000 1px solid; border-top: #000000 1px solid;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<tbody>
<tr class="R0">
<td class="R0C8" colspan="8">Приложение<br/>к договору № <t
t-esc="o.mt_contract_id.name"/><br/>на поставку продукции<br/>от <t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8">Спецификация № 1</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="4"><t
t-esc="o.mt_contract_id.company_id.partner_id.city or ''"/></td>
<td class="R0C2" colspan="4"><t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C3" colspan="8">
<span>
<t t-raw="o.mt_contract_id.contract_header or ''"/>
</span>
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="8">1. По договору на поставку продукции <t
t-esc="o.mt_contract_id.name or ''"/> от <t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_start) or ''"/>.
Поставщик обязуется поставить, а Покупатель оплатить в полном объеме следующее:</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C9box">Номенклатура</td>
<!-- <td class="R0C9box">*ГОСТ</td>-->
<td class="R0C9box">Ед.изм.</td>
<td class="R0C9box">Кол-во</td>
<td class="R0C9box">Цена/руб.<br/>без НДС</td>
<td class="R0C9box">Стоимость/руб.<br/>без НДС</td>
<!-- <td class="R0C9box">НДС</td>-->
<!-- <td class="R0C9box">Стоимость/руб.<br/>c НДС</td>-->
</tr>
<t t-set="order_line" t-value="o.order_line.filtered(lambda s: 'аванс' not in s.name.lower() and 'депозит' not in s.name.lower())"/>
<t t-set="quantity" t-value="sum([line.product_uom_qty for line in order_line])"/>
<t t-set="sum_full"
t-value="sum([line.product_uom_qty*line.price_unit for line in order_line])"/>
<t t-set="sum_nds"
t-value="sum([line.product_uom_qty*line.price_unit*1.2 for line in order_line])"/>
<tr class="R0" t-foreach="order_line" t-as="line">
<td class="R0C9box"><t t-esc="line.product_id.name or ''"/></td>
<!-- <td class="R0C9box">&lt;!&ndash;ГОСТ&ndash;&gt;</td>-->
<td class="R0C9box"><t t-esc="line.product_id.uom_id.name or ''"/></td>
<td class="R0C9box"><t t-esc="line.product_uom_qty or ''"/></td>
<td class="R0C9box"><t t-esc="line.price_unit or ''"/></td>
<td class="R0C9box"><t t-esc="line.price_unit*line.product_uom_qty or ''"/></td>
<!-- <td class="R0C9box">20%</td>-->
<!-- <td class="R0C9box"><t t-esc="line.price_unit*line.product_uom_qty*1.2 or ''"/></td>-->
</tr>
<tr class="R0">
<td></td>
<!-- <td></td>-->
<td>ИТОГО</td>
<td class="R0C9box"><t t-esc="quantity or ''"/></td>
<td class="R0C9box">x</td>
<td class="R0C9box"><t t-esc="sum_full or ''"/></td>
<!-- <td class="R0C9box">x</td>-->
<!-- <td class="R0C9box"><t t-esc="sum_nds or ''"/></td>-->
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
<tr class="R0">
<td class="R0C5" colspan="8">Итого: <t t-esc="sum_full or ''"/> рублей (<t
t-esc="o.mt_contract_id.rubles(sum_full) or ''"/>). В стоимость продукции входит стоимость
тары и стоимость транспортных расходов, связанных с доставкой продукции до станции
назначения.<br/>
2. Базис поставки (пункт назначения) по отгрузочным реквизитам:<br/>
<t t-esc="o.mt_contract_id.address_delivery(o.mt_contract_id.partner_id.id) or ''"/><br/>
Грузополучатель: <t t-esc="o.mt_contract_id.partner_id.name or ''"/>, код <t
t-esc="o.mt_contract_id.partner_id.id or ''"/>, ОКПО <t
t-esc="o.mt_contract_id.partner_id.okpo or ''"/>.<br/>
3. Условия оплаты: <t t-esc="o.payment_term_id.name or ''"/> согласно выставленному счету
Поставщика.<br/>
4. Срок отгрузки: <t
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_end) or ''"/><br/>
5. Срок действия настоящей спецификации ограничен и равен сроку отгрузки по условиям
данной спецификации.
</td>
</tr>
<tr class="R0">
<td class="R0C0" colspan="8"></td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%; page-break-inside: avoid;">
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<COL WIDTH="5%"/>
<COL WIDTH="30%"/>
<COL WIDTH="15%"/>
<tbody>
<tr class="R0">
<td class="R0C4" colspan="6">Реквизиты и подписи сторон.</td>
</tr>
<tr class="R0">
<td class="R0C1" colspan="6"></td>
</tr>
<tr class="R0">
<td class="R0C6rtl" colspan="3">Поставщик:</td>
<td class="R0C6rtl" colspan="3">Покупатель:</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contract_id.company_id.name or ''"/></td>
<td class="R0C6rl" colspan="3"><t t-esc="o.mt_contract_id.partner_id.name or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">ИНН
<t t-esc="o.mt_contract_id.company_id.inn or ''"/>
</td>
<td class="R0C7rl" colspan="3">ИНН <t
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="2">ОГРН
<t t-esc="o.company_id.company_registry or ''"/>
</td>
<td class="R0C6r" rowspan="2">
<t t-esc="o.mt_contract_id.name_dirprint1 or ''"/>
</td>
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
<td class="R0C7rl" colspan="3">ОГРН
<t t-esc="o.partner_id.ogrn or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3">Паспорт
<t t-esc="o.partner_id.passport or ''"/>
</td>
</t>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">КПП
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
</td>
<t t-if="o.mt_contract_id.partner_type == 'company'">
<td class="R0C7rl" colspan="3">КПП
<t t-esc="o.partner_id.kpp or ''"/>
</td>
</t>
<t t-else="">
<td class="R0C7rl" colspan="3"></td>
</t>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
<td class="R0C6rl" colspan="3">Юридический адрес:
</td>
</tr>
<tr class="R0">
<td class="R0C6l" colspan="3">
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
</td>
<td class="R0C7rl" colspan="3">
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6l"></td>
<td class="R0C6tI">
<SPAN>
<t t-raw="o.stamp and o.mt_contract_id.img(o.company_id.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C6tS">
<SPAN>
<t t-raw="o.stamp and o.mt_contract_id.img(o.company_id.stamp) or ''"/>
</SPAN>
</td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6l"></td>
<td class="R0C6b"></td>
<td class="R0C6r">
<t t-esc="''"/>
</td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rl" colspan="3"></td>
<td class="R0C6rl" colspan="3"></td>
</tr>
<tr class="R0">
<td class="R0C6rbl" colspan="3"></td>
<td class="R0C6rbl" colspan="3"></td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<STYLE TYPE="text/css">
body {background: #ffffff; margin: 0; font-family: Times new roman; font-size: 12pt; font-style:
normal;}
tr.R0{height: 30px;}
tr.R0 td.R0C0{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: bottom;}
tr.R0 td.R0C1{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: right; vertical-align: bottom;}
tr.R0 td.R0C6tI{ font-family: Times new roman; font-size: 11pt; font-style: normal; font-weight:
bold; text-align: left; vertical-align: top; border-bottom: #000000 1px solid;}
tr.R0 td.R0C6tI { overflow: visible; }
tr.R0 td.R0C6tI span { position: relative; }
tr.R0 td.R0C6tI span img { position: absolute; width: 100px; top: -5px; left: 5px;}
</STYLE>
<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<COL WIDTH="20%"/>
<tbody>
<tr class="R0">
<td class="R0C0">Подпись Исполнителя</td>
<td class="R0C6tI">
<SPAN>
<t
t-raw="o.stamp and o.mt_contract_id.img(company.chief_id.facsimile) or ''"/>
</SPAN>
</td>
<td class="R0C0"></td>
<td class="R0C1">Подпись Заказчика</td>
<td class="R0C6tI"></td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-3 pull-right">
<small style="font-size:18px;">
<span>Страница</span>
<span class="page"/>
из
<span class="topage"/>
</small>
</div>
</div>
</div>
</t>
</t>
</template>
<record id="paperformat_a4" model="report.paperformat">
<field name="name">A4</field>
<field name="default" eval="True"/>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Portrait</field>
<field name="margin_top">15</field>
<field name="margin_bottom">30</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">10</field>
<field name="dpi">90</field>
</record>
<record id="action_report_contract_customer_order1" model="ir.actions.report">
<field name="name">Спецификация</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_ru_contract.report_contract_customer_order1</field>
<field name="report_file">l10n_ru_contract.report_contract_customer_order1</field>
<field name="print_report_name">'Спецификация - %s' % (object.name)</field>
<field name="binding_model_id" ref="sale.model_sale_order" />
<field name="paperformat_id" ref="paperformat_a4" />
<field name="binding_type">report</field>
</record>
</odoo>

View File

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="action_report_contract_simple" model="ir.actions.report">
<field name="name">Договор (WeasyPrint)</field>
<field name="model">partner.contract.customer</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_ru_contract.report_contract_customer_modern</field>
<field name="report_file">l10n_ru_contract.report_contract_customer_modern</field>
<field name="print_report_name">'Договор - %s' % (object.name or '')</field>
<field name="binding_model_id" ref="l10n_ru_contract.model_partner_contract_customer" />
<field name="use_weasyprint">True</field>
</record>
<template id="report_contract_customer_modern">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-if="o and 'company_id' in o">
<t t-set="company" t-value="o.company_id"/>
</t>
<t t-if="not o or not 'company_id' in o">
<t t-set="company" t-value="res_company"/>
</t>
<t t-call="web.external_layout">
<!-- Корневой блок, передаём номер договора в string-set -->
<div class="page contract-root" t-att-data-contract-number="o.name or ''">
<style type="text/css">
@page {
size: A4;
margin: 18mm 20mm 22mm 20mm;
@bottom-right {
content: "Страница " counter(page) " из " counter(pages);
font-size: 9pt;
font-family: "DejaVu Serif", "Times New Roman", serif;
}
}
body {
font-family: "DejaVu Serif", "Times New Roman", serif;
font-size: 11pt;
line-height: 1.45;
color: #000;
background: #ffffff;
margin: 0;
}
.contract-root {
string-set: contract_number attr(data-contract-number);
}
.contract-main-title {
text-align: center;
font-size: 15pt;
font-weight: bold;
margin-bottom: 4mm;
}
.contract-subtitle {
text-align: center;
font-size: 11pt;
color: #444;
margin-bottom: 6mm;
}
.meta-table {
width: 100%;
margin-bottom: 6mm;
font-size: 10.5pt;
}
.meta-city { text-align: left; }
.meta-date { text-align: right; }
.parties-block {
margin-bottom: 10mm;
text-align: justify;
}
.clauses-root {
counter-reset: clause;
}
.clauses-columns {
column-count: 2;
column-gap: 12mm;
column-rule: 0.2mm solid #999;
}
.clause {
counter-increment: clause;
margin-bottom: 4mm;
break-inside: avoid-column;
}
.clause-title::before {
content: counter(clause) ". ";
font-weight: bold;
}
.clause-title {
font-weight: bold;
margin-bottom: 1mm;
}
.clause-body {
text-align: justify;
}
.requisites-title {
margin-top: 12mm;
margin-bottom: 4mm;
text-align: center;
font-weight: bold;
font-size: 12pt;
}
.requisites-grid {
display: grid;
grid-template-columns: 48% 48%;
column-gap: 4%;
row-gap: 6mm;
font-size: 10pt;
}
.requisites-card {
border: 1px solid #000;
padding: 4mm;
break-inside: avoid;
}
.requisites-card-title {
font-weight: bold;
text-transform: uppercase;
margin-bottom: 3mm;
text-align: center;
}
.requisites-line {
margin-bottom: 2mm;
}
.signature-block {
margin-top: 12mm;
display: grid;
grid-template-columns: 1fr 1fr;
column-gap: 12mm;
}
.signature-side-title {
font-size: 10pt;
font-weight: bold;
margin-bottom: 3mm;
}
.signature-line {
border-bottom: 1px solid #000;
height: 6mm;
margin-bottom: 2mm;
width: 60mm;
}
.signature-name {
font-size: 10pt;
margin-bottom: 4mm;
}
.signature-stamp {
margin-top: 4mm;
height: 30mm;
position: relative;
}
.signature-stamp img {
position: absolute;
max-width: 120px;
max-height: 120px;
left: 0;
top: -5mm;
}
.debug-test {
background: yellow;
border: 3px solid red;
font-size: 20pt;
}
</style>
<div class="debug-test">
ТЕСТ CSS
</div>
<!-- Шапка договора -->
<div class="header-block">
<div class="contract-main-title">
ДОГОВОР ПОСТАВКИ ПРОДУКЦИИ № <t t-esc="o.name or ''"/>
</div>
<div class="contract-subtitle">
(пример шаблона, оптимизированного под WeasyPrint)
</div>
<table class="meta-table" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="meta-city">
<t t-esc="company.partner_id.city or ''"/>
</td>
<td class="meta-date">
<t t-esc="o.get_date_text(o.date_start) if o.date_start else ''"/>
</td>
</tr>
</tbody>
</table>
<div class="parties-block">
<t t-if="o.partner_type in ['company', 'company_ip']">
<t t-esc="company.name or ''"/>,
именуемое в дальнейшем «Поставщик», с одной стороны, и
<t t-esc="o.partner_id.name or ''"/>,
именуемое в дальнейшем «Покупатель», совместно именуемые «Стороны»,
заключили настоящий договор о нижеследующем:
</t>
<t t-else="">
<t t-esc="company.name or ''"/> (далее — «Поставщик») и
гражданин(ка) <t t-esc="o.partner_id.name or ''"/> (далее — «Покупатель»),
совместно именуемые «Стороны», заключили настоящий договор о нижеследующем:
</t>
</div>
</div>
<!-- Основная часть: пункты в две колонки -->
<div class="clauses-root clauses-columns">
<t t-foreach="o.lines_ids.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
<div class="clause">
<div class="clause-title">
<t t-esc="line.name or ''"/>
</div>
<div class="clause-body">
<span>
<t t-raw="line.punct or ''"/>
</span>
</div>
</div>
</t>
</div>
<!-- Реквизиты и подписи с использованием CSS Grid -->
<div class="requisites-title">
Реквизиты и подписи сторон
</div>
<div class="requisites-grid">
<!-- Поставщик -->
<div class="requisites-card">
<div class="requisites-card-title">Поставщик</div>
<div class="requisites-line">
<strong>Наименование:</strong>
<t t-esc="company.name or ''"/>
</div>
<div class="requisites-line">
<strong>ИНН:</strong>
<t t-esc="company.inn or ''"/>
</div>
<div class="requisites-line">
<strong>ОГРН:</strong>
<t t-esc="company.company_registry or ''"/>
</div>
<div class="requisites-line">
<strong>КПП:</strong>
<t t-esc="company.kpp or ''"/>
</div>
<div class="requisites-line">
<strong>Юр. адрес:</strong><br/>
<t t-esc="o.address(o.company_id) or ''"/>
</div>
</div>
<!-- Покупатель -->
<div class="requisites-card">
<div class="requisites-card-title">Покупатель</div>
<div class="requisites-line">
<strong>Наименование / ФИО:</strong>
<t t-esc="o.partner_id.name or ''"/>
</div>
<div class="requisites-line">
<strong>ИНН:</strong>
<t t-esc="o.partner_id.inn or ''"/>
</div>
<t t-if="o.partner_type in ['company', 'company_ip']">
<div class="requisites-line">
<strong>ОГРН:</strong>
<t t-esc="o.partner_id.ogrn or ''"/>
</div>
<t t-if="o.partner_type == 'company'">
<div class="requisites-line">
<strong>КПП:</strong>
<t t-esc="o.partner_id.kpp or ''"/>
</div>
</t>
</t>
<t t-else="">
<div class="requisites-line">
<strong>Паспорт:</strong>
<t t-esc="o.partner_id.passport or ''"/>
</div>
</t>
<div class="requisites-line">
<strong>Юр. адрес / адрес регистрации:</strong><br/>
<t t-esc="o.address(o.partner_id) or ''"/>
</div>
</div>
</div>
<div class="signature-block">
<div>
<div class="signature-side-title">Поставщик</div>
<div class="signature-line"></div>
<div class="signature-name">
<t t-esc="o.director_name_company or ''"/>
</div>
<div class="signature-stamp">
<t t-if="o.stamp">
<t t-raw="o.img(o.company_id.stamp) or ''"/>
</t>
</div>
</div>
<div>
<div class="signature-side-title">Покупатель</div>
<div class="signature-line"></div>
<div class="signature-name">
<!-- тут можно вывести ФИО либо оставить пустым -->
<t t-esc="''"/>
</div>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>