Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f0659575dd | ||
![]() |
f27293b640 |
@ -1,7 +1,6 @@
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
from datetime import datetime, date
|
||||
import werkzeug
|
||||
|
||||
|
||||
class ActRevise(http.Controller):
|
||||
@ -14,13 +13,9 @@ class ActRevise(http.Controller):
|
||||
partner = request.env.user.partner_id.id
|
||||
partner_name = request.env.user.partner_id.name
|
||||
company = request.env.user.company_id.id
|
||||
# company_name = request.env.user.company_id.name
|
||||
# today = date.today()
|
||||
# d1 = today.strftime("%d.%m.%y")
|
||||
#
|
||||
# new_url=str('AC ' + company +' - ' + partner + ' ' + d1)
|
||||
# if request.httprequest.full_path == '/my/act_revise/a?':
|
||||
# return werkzeug.utils.redirect('/my/act_revise/%s' % new_url)
|
||||
company_name = request.env.user.company_id.name
|
||||
today = date.today()
|
||||
d1 = today.strftime("%d.%m.%y")
|
||||
|
||||
wizard_data = {
|
||||
"target_move": "posted",
|
||||
@ -33,14 +28,10 @@ class ActRevise(http.Controller):
|
||||
}
|
||||
wizard_record = request.env['general.ledger.act_revise.wizard'].sudo().create(wizard_data)
|
||||
|
||||
action_read = request.env.ref('l10n_ru_act_rev.action_general_ledger_wizard').sudo().read()
|
||||
if action_read:
|
||||
action = action_read[0]
|
||||
action = request.env.ref('l10n_ru_act_rev.action_general_ledger_wizard').read()[0]
|
||||
action['res_id'] = wizard_record.id
|
||||
action['context'] = dict(request.env.context)
|
||||
return request.redirect('/web#action=' + str(action['id']) + '&id=' + str(wizard_record.id) + '&view_type=form')
|
||||
else:
|
||||
return request.make_response("Error: Action not found.",[('Content-Type', 'text/plain')],400)
|
||||
|
||||
# @http.route(['/my/act_revise/<string:act>'], type='http', auth="public", website=True)
|
||||
# def print_report(self):
|
||||
|
@ -5,10 +5,9 @@ import operator
|
||||
from odoo.exceptions import UserError
|
||||
from odoo import _, api, models
|
||||
from odoo.tools import float_is_zero
|
||||
import logging
|
||||
|
||||
class GeneralLedgerReport(models.AbstractModel):
|
||||
_name = "report.l10n_ru_act_rev.general_ledger"
|
||||
_name = "report.act_revise.general_ledger"
|
||||
_description = "General Ledger Report"
|
||||
|
||||
COMMON_ML_FIELDS = [
|
||||
@ -200,7 +199,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
|
||||
def _get_acc_prt_accounts_ids(self, company_id, grouped_by):
|
||||
accounts_domain = [
|
||||
("company_ids", "=", company_id),
|
||||
("company_id", "=", company_id),
|
||||
] + self._get_account_type_domain(grouped_by)
|
||||
acc_prt_accounts = self.env["account.account"].search(accounts_domain)
|
||||
return acc_prt_accounts.ids
|
||||
@ -209,7 +208,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
self, account_ids, company_id, date_from, base_domain, grouped_by, acc_prt=False
|
||||
):
|
||||
accounts_domain = [
|
||||
("company_ids", "=", company_id),
|
||||
("company_id", "=", company_id),
|
||||
("include_initial_balance", "=", True),
|
||||
]
|
||||
if account_ids:
|
||||
@ -227,7 +226,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
self, account_ids, company_id, date_from, fy_start_date, base_domain
|
||||
):
|
||||
accounts_domain = [
|
||||
("company_ids", "=", company_id),
|
||||
("company_id", "=", company_id),
|
||||
("include_initial_balance", "=", False),
|
||||
]
|
||||
if account_ids:
|
||||
@ -257,7 +256,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
self, account_ids, company_id, fy_start_date, base_domain
|
||||
):
|
||||
accounts_domain = [
|
||||
("company_ids", "=", company_id),
|
||||
("company_id", "=", company_id),
|
||||
("include_initial_balance", "=", False),
|
||||
]
|
||||
if account_ids:
|
||||
@ -931,16 +930,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
list_centralized_ml += list(centralized_ml[jnl_id].values())
|
||||
return list_centralized_ml
|
||||
|
||||
@api.model
|
||||
def _get_report_values(self, docids, data):
|
||||
logging.info(f'@@@@ general_ledger ')
|
||||
logging.info(f'@@@@---------------------------------------------------------------------------------------------- _get_report_values ')
|
||||
logging.info(f'@@@@----------------------------------------------------------------------------------------------' )
|
||||
logging.info(f'@@@@---------------------------------------------------------------------------------------------- ')
|
||||
logging.info(f'@@@@----------------------------------------------------------------------------------------------' )
|
||||
logging.info(f'@@@@---------------------------------------------------------------------------------------------- ')
|
||||
logging.info(f'@@@@---------------------------------------------------------------------------------------------- ')
|
||||
|
||||
wizard_id = data["wizard_id"]
|
||||
company = self.env["res.company"].browse(data["company_id"])
|
||||
company_id = data["company_id"]
|
||||
@ -1014,11 +1004,6 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
account[grouped_by] = False
|
||||
del account["list_grouped"]
|
||||
general_ledger = sorted(general_ledger, key=lambda k: k["code"])
|
||||
logging.info(f'@@@@ general_ledger ')
|
||||
logging.info(f'@@@@ general_ledger ')
|
||||
logging.info(f'@@@@ general_ledger {general_ledger}')
|
||||
logging.info(f'@@@@ general_ledger ')
|
||||
logging.info(f'@@@@ general_ledger ')
|
||||
if not general_ledger:
|
||||
raise UserError(f'Проводок для формирования акта по введенным условиям не найдено.')
|
||||
return {
|
||||
|
@ -1,3 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_general_ledger_act_revise_wizard,general.ledger.act_revise.wizard,model_general_ledger_act_revise_wizard,base.group_user,1,1,1,1
|
||||
access_general_ledger_act_revise_wizard_portal,general.ledger.act_revise.wizard.portal,model_general_ledger_act_revise_wizard,base.group_portal,1,1,1,1
|
||||
|
|
@ -117,7 +117,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
)
|
||||
if self.company_id:
|
||||
self.account_ids = self.account_ids.filtered(
|
||||
lambda a: a.company_ids == self.company_id
|
||||
lambda a: a.company_id == self.company_id
|
||||
)
|
||||
|
||||
def _init_date_from(self):
|
||||
@ -158,7 +158,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
count = self.env["account.account"].search_count(
|
||||
[
|
||||
("account_type", "=", "equity_unaffected"),
|
||||
("company_ids", "=", self.company_id.id),
|
||||
("company_id", "=", self.company_id.id),
|
||||
]
|
||||
)
|
||||
self.not_only_one_unaffected_earnings_account = count != 1
|
||||
@ -181,7 +181,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
self.onchange_type_accounts_only()
|
||||
else:
|
||||
self.account_ids = self.account_ids.filtered(
|
||||
lambda a: a.company_ids == self.company_id
|
||||
lambda a: a.company_id == self.company_id
|
||||
)
|
||||
if self.company_id and self.cost_center_ids:
|
||||
self.cost_center_ids = self.cost_center_ids.filtered(
|
||||
@ -199,9 +199,9 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
if not self.company_id:
|
||||
return res
|
||||
else:
|
||||
res["domain"]["account_ids"] += [("company_ids", "=", self.company_id.id)]
|
||||
res["domain"]["account_ids"] += [("company_id", "=", self.company_id.id)]
|
||||
res["domain"]["account_journal_ids"] += [
|
||||
("company_ids", "=", self.company_id.id)
|
||||
("company_id", "=", self.company_id.id)
|
||||
]
|
||||
res["domain"]["partner_ids"] += self._get_partner_ids_domain()
|
||||
res["domain"]["cost_center_ids"] += [
|
||||
@ -240,7 +240,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
def onchange_type_accounts_only(self):
|
||||
"""Handle receivable/payable accounts only change."""
|
||||
if self.receivable_accounts_only or self.payable_accounts_only:
|
||||
domain = [("company_ids", "=", self.company_id.id)]
|
||||
domain = [("company_id", "=", self.company_id.id)]
|
||||
if self.receivable_accounts_only and self.payable_accounts_only:
|
||||
domain += [
|
||||
("account_type", "in", ("asset_receivable", "liability_payable"))
|
||||
@ -267,7 +267,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
record.unaffected_earnings_account = self.env["account.account"].search(
|
||||
[
|
||||
("account_type", "=", "equity_unaffected"),
|
||||
("company_ids", "=", record.company_id.id),
|
||||
("company_id", "=", record.company_id.id),
|
||||
]
|
||||
)
|
||||
|
||||
@ -306,6 +306,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
('date', '<=', self.date_to),
|
||||
('date', '>=', self.date_from)
|
||||
])
|
||||
logging.warning(f'account_data {account_data}')
|
||||
if self.target_move == 'posted' and not account_data.filtered(lambda p: p.parent_state == 'posted') or not account_data:
|
||||
raise UserError(f'Проводок для формирования акта по введенным условиям не найдено.')
|
||||
return {
|
||||
|
@ -19,10 +19,10 @@
|
||||
<!-- <field name="date_range_id" />-->
|
||||
<field name="date_from" />
|
||||
<field name="date_to" />
|
||||
<field name="fy_start_date" invisible="1" /><!-- reason: need-->
|
||||
<field name="fy_start_date" invisible="1" />
|
||||
<field name="target_move" widget="radio" />
|
||||
</group>
|
||||
<group name="other_filters" invisible="1"><!-- reason: need-->
|
||||
<group name="other_filters" invisible="1">
|
||||
<field name="grouped_by" />
|
||||
<field name="centralize" />
|
||||
<field name="hide_account_at_0" />
|
||||
@ -30,7 +30,7 @@
|
||||
<field name="show_cost_center" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook invisible="1"><!-- reason: need-->
|
||||
<notebook invisible="1">
|
||||
<page string="Filter accounts">
|
||||
<group name="account_filter" col="4">
|
||||
<label for="account_ids" colspan="4" />
|
||||
@ -94,7 +94,10 @@
|
||||
</notebook>
|
||||
</div>
|
||||
<div invisible= "not_only_one_unaffected_earnings_account==False" >
|
||||
<field name="not_only_one_unaffected_earnings_account" invisible="1"/><!-- reason: need-->
|
||||
<field
|
||||
name="not_only_one_unaffected_earnings_account"
|
||||
invisible="1"
|
||||
/>
|
||||
<group />
|
||||
<h4>
|
||||
General Ledger can be computed only if selected company have
|
||||
|
Binary file not shown.
@ -9,11 +9,3 @@ class HrEmployee(models.Model):
|
||||
inn = fields.Char(string=_("ИНН"))
|
||||
pass_kem = fields.Char(string=_("Кем выдан паспорт"))
|
||||
pass_date = fields.Date(string=_('Дата выдачи паспорта'))
|
||||
|
||||
class HrEmployeePublic(models.Model):
|
||||
_inherit = 'hr.employee.public'
|
||||
|
||||
inn = fields.Char(related='employee_id.inn', readonly = True)
|
||||
pass_kem = fields.Char(related='employee_id.pass_kem', readonly = True)
|
||||
pass_date = fields.Date(related='employee_id.pass_date', readonly = True)
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
string="Доверенность"
|
||||
id="action_report_consent"
|
||||
model="base.consent"
|
||||
report_type="qweb-pdf"
|
||||
report_type="qweb-html"
|
||||
name="l10n_ru_attorney.report_consent"
|
||||
file="l10n_ru_attorney.report_consent"
|
||||
/>
|
||||
@ -14,7 +14,7 @@
|
||||
<field name="name">Доверенность</field>
|
||||
<field name="model">base.consent</field>
|
||||
<field name="print_report_name">(u'Доверенность - %s.pdf' % (object.name))</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_type">qweb-html</field>
|
||||
<field name="report_name">l10n_ru_attorney.report_consent</field>
|
||||
</record>
|
||||
|
||||
@ -35,102 +35,275 @@
|
||||
</record>
|
||||
|
||||
<template id="l10n_ru_attorney.report_consent">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div class="page">
|
||||
<style type="text/css">
|
||||
/*----------------Invoice classes-------------------*/
|
||||
body { background: #ffffff; font-family: Arial; font-size: 8pt; font-style: normal; }
|
||||
p { font-family: Arial; font-size: 13px; }
|
||||
.tb-numbers { width: 600px; }
|
||||
.tb-numbers td { padding: 4px 10px; font-family: Arial; }
|
||||
.tb-numbers label {display: inline-block;padding: 4px 0px 0px;line-height: 20px;font-size:
|
||||
12px;font-family: Arial;}
|
||||
.tb-numbers input {width: 100px;}
|
||||
.company-info {width: 100%;margin: 20px auto;}
|
||||
.company-info td {padding: 5px 2px;font-size: 13px;font-family: Arial;}
|
||||
.approver-info {width: 100%;margin: 20px auto;text-align: center;}
|
||||
.approver-info .director {font-weight: bold;}
|
||||
.approver-info .title {font-weight: bold;font-size: 18px;padding-bottom: 20px;}
|
||||
.approver-info .signature {font-size: 11px;padding-top: 40px;}
|
||||
.actDate {float: right;}
|
||||
.actDescription {width: 100%;padding-top: 30px;}
|
||||
.act-info p {font-weight: bold;}
|
||||
.buyer-box {width: 50%;}
|
||||
.buyer-box table {width: 100%;}
|
||||
.buyer-box .tb-info {width: 310px;}
|
||||
.buyer-box .tb-info td {padding: 2px 5px;}
|
||||
.buyer-box .tb-info td.lbl {text-align: right;font-weight: bold;width: 40%;}
|
||||
.tb-invoice {width: 100%;border-collapse: collapse;}
|
||||
.tb-invoice td {padding: 2px 4px;border: 1px solid #ccc;font-size: 11px;text-align:
|
||||
center;font-family: Arial;}
|
||||
.tb-invoice td input {border: 0px;text-align: center;}
|
||||
.tb-invoice .head td {background: #f3f3f3;font-weight: bold;}
|
||||
.deleteRow {color: Red;font-size: 13px;font-weight: bold;cursor: pointer;}
|
||||
.tb-act {width: 100%;border-collapse: collapse;margin-bottom: 15px;clear: both;margin: 20px
|
||||
0px 10px 0px;}
|
||||
.tb-act td {padding: 2px 4px;border: 1px solid #ccc;font-size:
|
||||
13px;text-align:center;font-family: Arial;}
|
||||
.tb-act td input {border: 0px;text-align:center;}
|
||||
.tb-act .head td {background:#f3f3f3;}
|
||||
.tb-act td .deleteActRow {color: Red;font-size :13 px;font-weight:bold;cursor:pointer;}
|
||||
.description {font-size :12 px;text-align :justify;text-indent :1.5 em;white-space
|
||||
:pre-wrap;}
|
||||
.tb-total {width :405 px;margin: 30px 0px 20px auto;}
|
||||
.tb-total td {padding: 2px 5px;font-size :12 px;}
|
||||
.tb-total td.lbl {font-weight:bold;text-align:right;}
|
||||
.tb-total td.val {border :1 px solid #ccc ;min-width :50 px ;}
|
||||
.tb-total td input {padding :1 px ;font-size :11 px ;}
|
||||
.act-link-addrow-container {margin-bottom :30 px ;}
|
||||
.link-addrow, .act-link-addrow {text-decoration:none !important ;border-bottom :1 px dashed
|
||||
#777 ;font-size :13 px ;}
|
||||
.btn-box {margin: 10px 0px;}
|
||||
.signer-box {width: 400px;}
|
||||
.buyer-box .tb-info {width: 400px;}
|
||||
.btn-box a {font-size: 14px;margin-left: 10px;}
|
||||
.podpis-box {clear: both;display: inline-block;font-size: 11px;margin: 20px auto 30px;width:
|
||||
100%;}
|
||||
.tb-podpis {width: 100%;}
|
||||
.podpis-box .box1 {float: left;width: 48%;}
|
||||
|
||||
p {
|
||||
font-size: 13px;
|
||||
}
|
||||
.tb-numbers {
|
||||
width: 600px;
|
||||
}
|
||||
.tb-numbers td {
|
||||
padding: 4px 10px;
|
||||
}
|
||||
.tb-numbers label {
|
||||
display: inline-block;
|
||||
padding: 4px 0px 0px;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.tb-numbers input {
|
||||
width: 100px;
|
||||
}
|
||||
.company-info {
|
||||
width: 100%;
|
||||
margin: 20px auto;
|
||||
}
|
||||
.company-info td {
|
||||
padding: 5px 2px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.approver-info {
|
||||
width: 100%;
|
||||
margin: 20px auto;
|
||||
text-align: center
|
||||
}
|
||||
.approver-info .director {
|
||||
font-weight: bold;
|
||||
}
|
||||
.approver-info .title {
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.approver-info .signature {
|
||||
font-size: 11px;
|
||||
padding-top: 40px;
|
||||
}
|
||||
.actDate {
|
||||
float: right
|
||||
}
|
||||
.actDescription {
|
||||
width: 100%;
|
||||
padding-top: 30px
|
||||
}
|
||||
.act-info p {
|
||||
font-weight: bold;
|
||||
}
|
||||
.buyer-box {
|
||||
width: 50%;
|
||||
}
|
||||
.buyer-box table {
|
||||
width: 100%;
|
||||
}
|
||||
.buyer-box .tb-info {
|
||||
width: 310px;
|
||||
}
|
||||
.buyer-box .tb-info td {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.buyer-box .tb-info td.lbl {
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
width: 40%;
|
||||
}
|
||||
.tb-invoice {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.tb-invoice td {
|
||||
padding: 2px 4px;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
.tb-invoice td input {
|
||||
border: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
.tb-invoice .head td {
|
||||
background: #f3f3f3;
|
||||
font-weight: bold;
|
||||
}
|
||||
.deleteRow {
|
||||
color: Red;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tb-act {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 15px;
|
||||
clear: both;
|
||||
margin: 20px 0px 10px 0px;
|
||||
}
|
||||
.tb-act td {
|
||||
padding: 2px 4px;
|
||||
border: 1px solid #ccc;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
.tb-act td input {
|
||||
border: 0px;
|
||||
text-align: center;
|
||||
}
|
||||
.tb-act .head td {
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.tb-act td .deleteActRow {
|
||||
color: Red;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
.description {
|
||||
font-size: 12px;
|
||||
text-align: justify;
|
||||
text-indent: 1.5em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.tb-total {
|
||||
width: 405px;
|
||||
margin: 30px 0px 20px auto;
|
||||
}
|
||||
.tb-total td {
|
||||
padding: 2px 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.tb-total td.lbl {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
}
|
||||
.tb-total td.val {
|
||||
border: 1px solid #ccc;
|
||||
min-width: 50px;
|
||||
}
|
||||
.tb-total td input {
|
||||
padding: 1px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.act-link-addrow-container {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.link-addrow,
|
||||
.act-link-addrow {
|
||||
text-decoration: none !important;
|
||||
border-bottom: 1px dashed #777;
|
||||
font-size: 13px;
|
||||
}
|
||||
.btn-box {
|
||||
margin: 10px 0px;
|
||||
}
|
||||
.signer-box {
|
||||
width: 400px;
|
||||
}
|
||||
.buyer-box .tb-info {
|
||||
width: 400px;
|
||||
}
|
||||
.btn-box a {
|
||||
font-size: 14px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.podpis-box {
|
||||
clear: both;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
margin: 20px auto 30px;
|
||||
width: 100%;
|
||||
}
|
||||
.tb-podpis {
|
||||
width: 100%;
|
||||
}
|
||||
.podpis-box .box1 {
|
||||
float: left;
|
||||
width: 48%;
|
||||
}
|
||||
/*SIGNATURES PLACE BEGIN*/
|
||||
.signatures-box {clear: both;display: inline-block;font-size: 11px;margin: 20px auto
|
||||
30px;width: 100%;}
|
||||
.signatures-box .box1 {float: left;width: 35%;}
|
||||
.signatures-box .box2 {float: right;width: 35%;}
|
||||
.signatures-box {
|
||||
clear: both;
|
||||
display: inline-block;
|
||||
font-size: 11px;
|
||||
margin: 20px auto 30px;
|
||||
width: 100%;
|
||||
}
|
||||
.signatures-box .box1 {
|
||||
float: left;
|
||||
width: 35%;
|
||||
}
|
||||
.signatures-box .box2 {
|
||||
float: right;
|
||||
width: 35%;
|
||||
}
|
||||
.signatures-box .box1 table,
|
||||
.signatures-box .box2 table { width: 100%; }
|
||||
.signatures-box table td { padding: 3px; text-align: center; }
|
||||
|
||||
.signatures-box .box2 table {
|
||||
width: 100%;
|
||||
}
|
||||
.signatures-box table td {
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
/*SIGNATURES PLACE END*/
|
||||
.podpis-box .box2 { float: right; width: 48%; }
|
||||
.podpis-box .box2 {
|
||||
float: right;
|
||||
width: 48%;
|
||||
}
|
||||
.podpis-box .box1 table,
|
||||
.podpis-box .box2 table { width: 100%; }
|
||||
.podpis-box table td { padding: 3px; text-align: center; }
|
||||
.special-line { border-bottom: 1px solid #000; display: block; line-height: 22px
|
||||
!important;text-align: center; }
|
||||
.w120 { width: 120px; }
|
||||
.w130 { width: 130px; }
|
||||
.note { font-size: 11px !important; }
|
||||
.l { text-align: left !important; }
|
||||
.r { text-align: right !important; }
|
||||
.c { text-align: center !important; }
|
||||
</style>
|
||||
.podpis-box .box2 table {
|
||||
width: 100%;
|
||||
}
|
||||
.podpis-box table td {
|
||||
padding: 3px;
|
||||
text-align: center;
|
||||
}
|
||||
.special-line {
|
||||
border-bottom: 1px solid #000;
|
||||
display: block;
|
||||
line-height: 22px !important;
|
||||
text-align: center;
|
||||
}
|
||||
.w120 {
|
||||
width: 120px;
|
||||
}
|
||||
.w130 {
|
||||
width: 130px;
|
||||
}
|
||||
.note {
|
||||
font-size: 11px !important;
|
||||
}
|
||||
.l {
|
||||
text-align: left !important;
|
||||
}
|
||||
.r {
|
||||
text-align: right !important;
|
||||
}
|
||||
.c {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div>
|
||||
<h4 style="text-align:center; margin:10px 5px 5px;">
|
||||
|
||||
|
||||
Доверенность №
|
||||
<span t-field="o.name"/>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<table style="width:55%">
|
||||
<tr>
|
||||
<td>Дата выдачи:</td>
|
||||
|
||||
|
||||
<td>
|
||||
<span t-field="o.date_from" t-options="{"widget": "date"}"/>
|
||||
г.
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Доверенность действительна по:</td>
|
||||
@ -141,45 +314,63 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<div class="special-line" style="width:100%;margin-top:15px;text-align:center">
|
||||
<b>
|
||||
<span t-field="o.company_id.name"/>, адрес:<span t-field="o.company_id.street"/>, ИНН
|
||||
<span t-field="o.company_id.vat"/>,
|
||||
|
||||
</b>
|
||||
</div>
|
||||
<div style="margin:0 auto;text-align:center;">наименование предприятия и его адрес</div>
|
||||
<table style="width:100%;margin-top:10px">
|
||||
<tr>
|
||||
<td style="width:30%">
|
||||
|
||||
|
||||
Доверенность выдана
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width:100%;text-align:center;">
|
||||
<span style="border-bottom:1px solid;display:block;clear:both;text-align:center;">
|
||||
<span t-field="o.employee_id"/>,<span t-field="o.employee_id.job_id.name"/>, ИНН
|
||||
<span t-field="o.employee_id.inn"/>
|
||||
|
||||
|
||||
</span>
|
||||
<span style="">
|
||||
|
||||
|
||||
должность и Ф.И.О.
|
||||
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>Паспорт серия и №
|
||||
|
||||
|
||||
<span style="padding:0 5px 0 5px;margin-left:12px;margin-right:12px;display:inline-table;"
|
||||
class="special-line">
|
||||
|
||||
<span t-field="o.employee_id.passport_id"/>
|
||||
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Кем выдан
|
||||
|
||||
|
||||
<span style="padding:0 5px 0 5px;margin-left:12px;margin-right:12px;display:inline-table;"
|
||||
class="special-line">
|
||||
<span t-field="o.employee_id.pass_kem"/>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
@ -187,10 +378,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Дата выдачи
|
||||
|
||||
|
||||
<span style="padding:0 5px 0 5px;margin-left:12px;margin-right:12px;display:inline-table;"
|
||||
class="special-line">
|
||||
|
||||
<span t-field="o.employee_id.pass_date"/>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -198,32 +395,56 @@
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td style="width:25%">
|
||||
|
||||
|
||||
На получение от
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width:75%;text-align:center;">
|
||||
<span style="border-bottom:1px solid;display:block;clear:both;">
|
||||
|
||||
|
||||
<span t-field="o.partner_id"/>
|
||||
|
||||
|
||||
</span>
|
||||
<span style="">
|
||||
|
||||
|
||||
наименование поставщика
|
||||
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:25%">
|
||||
|
||||
|
||||
Материальных ценностей по
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width:75%;text-align:center;">
|
||||
<span style="border-bottom:1px solid;display:block;clear:both;">
|
||||
|
||||
|
||||
Заказу на закупку №
|
||||
<span t-field="o.purchaseorder_id.name"/>
|
||||
от
|
||||
<span t-field="o.purchaseorder_id.date_order"
|
||||
t-options="{"widget": "date"}"/>
|
||||
г.
|
||||
|
||||
|
||||
</span>
|
||||
<span style="">
|
||||
|
||||
|
||||
наименование, номер и дата документа
|
||||
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -231,9 +452,15 @@
|
||||
|
||||
<div>
|
||||
<h4 style="text-align:center; margin:15px 5px 15px;">
|
||||
|
||||
|
||||
Перечень материальных ценностей,
|
||||
|
||||
|
||||
<br/>
|
||||
подлежащих получению
|
||||
|
||||
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
@ -267,30 +494,60 @@
|
||||
<div class="clear h100"></div>
|
||||
<div>
|
||||
<p></p>
|
||||
|
||||
<p>Подпись лица, получившего доверенность ___________________ удостоверяем</p>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="podpis-box">
|
||||
<table style="width:50%;">
|
||||
<tr>
|
||||
<td style="width: 13%;">Руководитель предприятия</td>
|
||||
<td style="width: 19%; vertical-align: bottom;">
|
||||
|
||||
|
||||
<span class="special-line"></span>
|
||||
|
||||
|
||||
<span class="note">(подпись)</span>
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width: 16%; vertical-align: bottom;">
|
||||
|
||||
|
||||
<span class="special-line"></span>
|
||||
|
||||
|
||||
<span class="note">(Ф.И.О)</span>
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width: 16%; vertical-align: bottom;"></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 13%;">Гл. бухгалтер:</td>
|
||||
<td style="width: 19%; vertical-align: bottom;">
|
||||
|
||||
|
||||
<span class="special-line"></span>
|
||||
|
||||
|
||||
<span class="note">(подпись)</span>
|
||||
|
||||
|
||||
</td>
|
||||
<td style="width: 16%; vertical-align: bottom;">
|
||||
|
||||
|
||||
<span class="special-line"></span>
|
||||
|
||||
|
||||
<span class="note">(Ф.И.О)</span>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -5,13 +5,13 @@
|
||||
<field name="name">Consents</field>
|
||||
<field name="model">base.consent</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</list>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@ -36,11 +36,10 @@
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
<!-- <div class="oe_chatter">-->
|
||||
<!-- <field name="message_follower_ids" widget="mail_followers"/>-->
|
||||
<!-- <field name="message_ids" widget="mail_thread"/>-->
|
||||
<!-- </div>-->
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@ -48,10 +47,10 @@
|
||||
<record id="l10n_ru_attorney.action_consent" model="ir.actions.act_window">
|
||||
<field name="name">Доверенности</field>
|
||||
<field name="res_model">base.consent</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="l10n_ru_attorney.menu_1" name="Доверенности" parent="purchase.menu_purchase_root"
|
||||
<menuitem id="l10n_ru_attorney.menu_1" name="Consents" parent="purchase.menu_purchase_root"
|
||||
action="l10n_ru_attorney.action_consent"/>
|
||||
|
||||
<record id="seq_consent" model="ir.sequence">
|
||||
|
@ -16,11 +16,11 @@
|
||||
'author': "MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
|
||||
'version': '18.0.1.0.0',
|
||||
'version': '17.0.1.0.0',
|
||||
'license': 'LGPL-3',
|
||||
'category': 'Uncategorized',
|
||||
|
||||
'depends': ["account", "portal", "website", 'contacts','base', 'mail', 'sale', 'purchase', 'hr','sale_management', 'sale_stock', 'uom','web'],
|
||||
'depends': [],
|
||||
|
||||
'data': [
|
||||
'views/res_config_settings_views.xml',
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ru_base
|
||||
# * base_russian_localization
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.0+e\n"
|
||||
"Project-Id-Version: Odoo Server 17.0+e-20240904\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-12-17 06:36+0000\n"
|
||||
"PO-Revision-Date: 2024-12-17 06:36+0000\n"
|
||||
"POT-Creation-Date: 2024-10-29 07:45+0000\n"
|
||||
"PO-Revision-Date: 2024-10-29 07:45+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -15,103 +15,95 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_ru_base/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__module_l10n_ru_act_rev
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
msgid "Act revise"
|
||||
msgstr "Акт сверки"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_ru_base/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__module_act_revise
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_act_revise
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Act revise"
|
||||
msgstr "Акт сверки"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__company_status_rf
|
||||
#. module: base_russian_localization
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__company_status_rf
|
||||
msgid "Company Status Rf"
|
||||
msgstr "Статус компании"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model:ir.model,name:l10n_ru_base.model_res_config_settings
|
||||
#. module: base_russian_localization
|
||||
#: model:ir.model,name:base_russian_localization.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Параметры конфигурации"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_ru_base/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__module_fehu_base_consent
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_fehu_base_consent
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Consent"
|
||||
msgstr "Доверенность"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_ru_base/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__module_contract
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_contract
|
||||
#, python-format
|
||||
msgid "Contract"
|
||||
msgstr "Договор"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Contracts"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Powers of attorney"
|
||||
msgstr "Доверенность на получение ТМЦ"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_ru_base/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__module_l10n_ru_doc
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_l10n_ru_doc
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Print forms"
|
||||
msgstr "Печатные формы"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report act revise"
|
||||
msgstr "Отчет Акт сверки"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report contract"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report report_xml"
|
||||
msgstr "УПД в формате xml для ЭДО"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_ru_base/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_ru_base.field_res_config_settings__module_report_xml
|
||||
#: code:addons/base_russian_localization/models/res_config_settings.py:0
|
||||
#: model:ir.model.fields,field_description:base_russian_localization.field_res_config_settings__module_report_xml
|
||||
#, python-format
|
||||
msgid "Report_xml"
|
||||
msgstr "Универсальный передаточный документ (УПД) в формате xml для ЭДО"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Russian Localization"
|
||||
msgstr "Российская локализация"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "UPD xml"
|
||||
msgstr "УПД в формате xml для ЭДО"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "print_forms"
|
||||
msgstr "Печатные формы документов"
|
||||
|
@ -4,8 +4,6 @@
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
import logging
|
||||
|
||||
_FIELDS_MODUL = [
|
||||
'module_l10n_ru_act_rev',
|
||||
'module_l10n_ru_contract',
|
||||
@ -25,16 +23,13 @@ class ResConfigSettings(models.TransientModel):
|
||||
|
||||
@api.model
|
||||
def write(self, values):
|
||||
if any(field in values for field in _FIELDS_MODUL):
|
||||
company = self.env.company
|
||||
if company.country_id.code != 'RU':
|
||||
raise UserError("Признак Российской компании не обнаружен!")
|
||||
|
||||
if _FIELDS_MODUL:
|
||||
missing_modules = set()
|
||||
for field in _FIELDS_MODUL:
|
||||
mapped_values = self.mapped(field)
|
||||
if mapped_values and mapped_values[0]:
|
||||
if self.mapped(field)[0]:
|
||||
module_name = field[7:]
|
||||
module_installed = self.env['ir.module.module'].search([('name', '=', module_name)], limit=1)
|
||||
if not module_installed:
|
||||
|
@ -1,30 +0,0 @@
|
||||
# Российская локализация - Договоры
|
||||
name: l10n_ru_contract
|
||||
|
||||
|
||||
## Описание
|
||||
Создание договоров с клиентами и поставщиками в системе.
|
||||
Возможность разделения договоров на виды, отслеживание статуса договора. Вы также можете распечатать договор из системы.
|
||||
|
||||
### Создание вида договора клиента(поставщика):
|
||||
1. Меню Продажи (Покупки) - Договоры - Виды договора - кнопка "Создать";
|
||||
2. На форме указываем:
|
||||
|
||||
2.1. Журнал и счета дебетовой и кредиторской задолженности;
|
||||
|
||||
2.2. Присваиваем новое название.
|
||||
|
||||
### Создание договора клиента (поставщика):
|
||||
1. Меню Продажи (Покупки) - Договоры - кнопка "Создать";
|
||||
2. На форме указываем основные и дополнительные условия договора:
|
||||
|
||||
2.1. Контрагент - клиент (поставщик);
|
||||
|
||||
2.2. Тип контрагента;
|
||||
|
||||
2.3. Компанию, от лица которой будет подписан договор;
|
||||
|
||||
2.4. Вид договора.
|
||||
|
||||
### Для печати:
|
||||
1. Открываем созданную запись договора - Действие - "Договор".
|
@ -1,41 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': 'Российская локализация - Договоры',
|
||||
'summary': """
|
||||
Создание договоров, их видов и печать
|
||||
""",
|
||||
|
||||
'description': """
|
||||
Создание договоров с клиентами и поставщиками. Возможность разделения на виды договоров, отслеживание статуса договора и его печатью
|
||||
Создание вида договора клиента(поставщика):
|
||||
1. Меню Продажи (Покупки) - Договоры - Виды договора - кнопка "Создать";
|
||||
2. На форме указываем:
|
||||
2.1. Журнал и счета дебетовой и кредиторской задолженности;
|
||||
2.2. Присваиваем новое название.
|
||||
|
||||
Создание договора клиента (поставщика):
|
||||
1. Меню Продажи (Покупки) - Договоры - кнопка "Создать";
|
||||
2. На форме указываем основные и дополнительные условия договора:
|
||||
2.1. Контрагент - клиент (поставщик);
|
||||
2.2. Тип контрагента;
|
||||
2.3. Компанию, от лица которой будет подписан договор;
|
||||
2.4. Вид договора.
|
||||
|
||||
Для печати:
|
||||
1. Открываем созданную запись договора - Действие - "Договор".
|
||||
""",
|
||||
|
||||
'version': '18.0.1.0.0',
|
||||
'name': 'Контракты клиентов',
|
||||
'version': '17.0.2024.02.02',
|
||||
'sequence': 0,
|
||||
'author': 'MK.Lab',
|
||||
'website': 'https://www.inf-centre.ru/',
|
||||
'external_dependencies': {
|
||||
'python': ['pymorphy2'],
|
||||
},
|
||||
'author': 'StarlingSoft',
|
||||
'website': 'https://inf-centre.ru',
|
||||
'depends': [
|
||||
'base',
|
||||
'mail',
|
||||
'account', 'sale', 'sale_management', 'purchase', 'l10n_ru_base'
|
||||
'account', 'sale', 'sale_management', 'purchase'
|
||||
],
|
||||
'data': [
|
||||
'data/data.xml',
|
||||
@ -44,7 +17,7 @@
|
||||
'report/report_contract.xml',
|
||||
'report/report_contract_order.xml',
|
||||
'report/report_contract_order1.xml',
|
||||
'report/report_contract_invoice.xml',
|
||||
'report/report_contract_invoce.xml',
|
||||
|
||||
],
|
||||
'installable': True,
|
||||
|
@ -1,9 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import account_move
|
||||
from . import contract_customer
|
||||
from . import crutch_fields_header
|
||||
from . import dop_field
|
||||
from . import purchase_order
|
||||
from . import sale_make_invoice_advance
|
||||
from . import sale_order
|
||||
from . import contract_customer, invoice_saleorder, dop_field, crutch_fields_header
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,50 +0,0 @@
|
||||
from odoo import api, fields, models, exceptions, _
|
||||
|
||||
|
||||
class AccountMove(models.Model):
|
||||
_inherit = 'account.move'
|
||||
|
||||
mt_contract_id = fields.Many2one('partner.contract.customer', string=_('Номер договора'))
|
||||
sf_number = fields.Char(string=_('Номер с/ф'))
|
||||
osnovanie = fields.Char(string=_('Основание'))
|
||||
sec_partner_id = fields.Many2one('res.partner', string=_('Контрагент'), store=True, compute='_compute_get_pid')
|
||||
stamp = fields.Boolean(string=_('Печать и подпись'), related='mt_contract_id.stamp')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def _compute_get_pid(self):
|
||||
for s in self:
|
||||
s.sec_partner_id = s.partner_id.parent_id if s.partner_id.parent_id else s.partner_id
|
||||
|
||||
@api.onchange('mt_contract_id')
|
||||
def set_ons(self):
|
||||
if self.mt_contract_id:
|
||||
self.osnovanie = 'Договор № ' + self.mt_contract_id.name + ' от ' + fields.Datetime.from_string(
|
||||
self.mt_contract_id.date_start).strftime("%d.%m.%Y")
|
||||
|
||||
@api.constrains('state')
|
||||
def invoice_fields_check(self):
|
||||
for s in self:
|
||||
if s.state == 'posted':
|
||||
if s.mt_contract_id:
|
||||
errors_list = []
|
||||
journal_in_contract = s.mt_contract_id.profile_id.journal_id
|
||||
payment_term_in_contract = s.mt_contract_id.profile_id.payment_term_id
|
||||
receivable_in_contract = s.mt_contract_id.profile_id.receivable_account_id
|
||||
|
||||
if journal_in_contract != s.journal_id:
|
||||
errors_list.append(f'Отличается Журнал - [{s.journal_id.name}] '
|
||||
f'и указанный в договоре №{s.mt_contract_id.name} '
|
||||
f'Журнал - [{journal_in_contract.name}]\n\n')
|
||||
|
||||
if payment_term_in_contract != s.invoice_payment_term_id:
|
||||
errors_list.append(f'Отличается поле "Условие оплаты" в инвойсе '
|
||||
f'[Условие оплаты - {s.invoice_payment_term_id.name}] '
|
||||
f'и указанный в договоре №{s.mt_contract_id.name} '
|
||||
f'[Условие оплаты - {payment_term_in_contract.name}]\n\n')
|
||||
|
||||
if receivable_in_contract not in s.line_ids.account_id:
|
||||
errors_list.append(f'Отличается поле "Счет дебиторской задолженности" в инвойсе '
|
||||
f'и указанный в договоре №{s.mt_contract_id.name}')
|
||||
|
||||
if errors_list:
|
||||
raise exceptions.ValidationError(''.join(errors_list))
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from odoo import api, fields, models, exceptions, tools, _
|
||||
from odoo import api, fields, models, exceptions, tools
|
||||
import pymorphy2
|
||||
from datetime import datetime, timedelta
|
||||
from dateutil.relativedelta import relativedelta
|
||||
@ -17,63 +17,63 @@ class PartnerContractCustomer(models.Model):
|
||||
six_months = datetime.today() + relativedelta(months=+11)
|
||||
return fields.Datetime.to_string(six_months)
|
||||
|
||||
name = fields.Char(string=_('Номер'))
|
||||
date_start = fields.Date(string=_('Дата договора'), required=True, default=fields.Datetime.now())
|
||||
partner_id = fields.Many2one('res.partner', string=_('Контрагент'), required=True)
|
||||
sec_partner_id = fields.Many2one('res.partner', string=_('Контрагент как в заказе'))
|
||||
company_id = fields.Many2one('res.company', string=_('Компания'), required=True)
|
||||
name_print = fields.Char(string=_('Имя для печати'), compute='_get_name_print')
|
||||
name_print1 = fields.Char(string=_('Имя для печати, И.П.'), compute='_get_name_printip')
|
||||
date_end = fields.Date(string=_('Дата окончания'), required=True, default=get_dateend)
|
||||
name_dirprint = fields.Char(string=_('Имя нашего директора для печати'))
|
||||
name_dirprint1 = fields.Char(string=_('Имя нашего директора для печати И.П.'))
|
||||
lines = fields.One2many('contract.line', 'contract_id', string=_('Договорные цены'))
|
||||
name = fields.Char(string='Номер')
|
||||
date_start = fields.Date(string='Дата договора', required=True, default=fields.Datetime.now())
|
||||
partner_id = fields.Many2one('res.partner', string='Контрагент', required=True)
|
||||
sec_partner_id = fields.Many2one('res.partner', string='Контрагент как в заказе')
|
||||
company_id = fields.Many2one('res.company', string='Компания', required=True)
|
||||
name_print = fields.Char(string='Имя для печати', compute='_get_name_print')
|
||||
name_print1 = fields.Char(string='Имя для печати, И.П.', compute='_get_name_printip')
|
||||
date_end = fields.Date(string='Дата окончания', required=True, default=get_dateend)
|
||||
name_dirprint = fields.Char(string='Имя нашего директора для печати')
|
||||
name_dirprint1 = fields.Char(string='Имя нашего директора для печати И.П.')
|
||||
lines = fields.One2many('contract.line', 'contract_id', string='Договорные цены')
|
||||
type = fields.Selection(
|
||||
[('customer', 'С покупателем'),
|
||||
('supplier', 'С поставщиком'),
|
||||
('other', 'Прочие расчеты'),
|
||||
|
||||
],
|
||||
string=_('Тип договора'), default='customer', required=True)
|
||||
saleorder_id = fields.Many2one('sale.order', string=_('Заказ/Сделка'))
|
||||
stamp = fields.Boolean(string=_('Печать и подпись'))
|
||||
signed = fields.Boolean(string=_('Договор подписан'))
|
||||
string='Тип договора', default='customer', required=True)
|
||||
saleorder_id = fields.Many2one('sale.order', string='Заказ/Сделка')
|
||||
stamp = fields.Boolean(string='Печать и подпись')
|
||||
signed = fields.Boolean(string='Договор подписан')
|
||||
state = fields.Selection(
|
||||
[('draft', 'Черновик'),
|
||||
('progress', 'На согласовании'),
|
||||
('signed', 'Подписан, действует'),
|
||||
('closed', 'Истёк'),
|
||||
],
|
||||
string=_('Статус'), default='draft', group_expand='_expand_states', index=True
|
||||
string='Статус', default='draft', group_expand='_expand_states', index=True
|
||||
)
|
||||
is_template = fields.Boolean(_('Это шаблон'))
|
||||
copy_from = fields.Many2one('partner.contract.customer', string=_('Копировать из этого шаблона'))
|
||||
profile_id = fields.Many2one('contract.profile', string=_('Вид договора'), required=True)
|
||||
credit_limit = fields.Float(string=_('Лимит кредита'))
|
||||
guid_1s = fields.Char(_('Код договора из 1С'))
|
||||
buh_code = fields.Char(_('Код договора из бухгалтерии'))
|
||||
payment_term_id = fields.Many2one('account.payment.term', string=_('Условие оплаты'))
|
||||
manager_id = fields.Many2one('res.users', string=_('Менеджер по продажам'))
|
||||
accountant_id = fields.Many2one('res.users', string=_('Бухгалтер по взаиморасчетам'))
|
||||
time_to_delivery_from = fields.Datetime(_('Время доставки от'))
|
||||
time_to_delivery_to = fields.Datetime(_('Время доставки до'))
|
||||
day_of_delivery = fields.Float(_('Дни доставки'))
|
||||
day_of_otgruzki = fields.Float(_('Дни отгрузки'))
|
||||
is_template = fields.Boolean('Это шаблон')
|
||||
copy_from = fields.Many2one('partner.contract.customer', string='Копировать из этого шаблона')
|
||||
profile_id = fields.Many2one('contract.profile', string='Вид договора', required=True)
|
||||
credit_limit = fields.Float(string='Лимит кредита')
|
||||
guid_1s = fields.Char('Код договора из 1С')
|
||||
buh_code = fields.Char('Код договора из бухгалтерии')
|
||||
payment_term_id = fields.Many2one('account.payment.term', string='Условие оплаты')
|
||||
manager_id = fields.Many2one('res.users', string='Менеджер по продажам')
|
||||
accountant_id = fields.Many2one('res.users', string='Бухгалтер по взаиморасчетам')
|
||||
time_to_delivery_from = fields.Datetime('Время доставки от')
|
||||
time_to_delivery_to = fields.Datetime('Время доставки до')
|
||||
day_of_delivery = fields.Float('Дни доставки')
|
||||
day_of_otgruzki = fields.Float('Дни отгрузки')
|
||||
|
||||
channel_id = fields.Many2one('saleorder.channel', string=_('Канал продаж'))
|
||||
team_id = fields.Many2one('crm.team', string=_('Команда продаж'))
|
||||
order_days_ids = fields.Many2many(comodel_name='contract.day', relation='orderdays', string=_('Дни доставки'),
|
||||
channel_id = fields.Many2one('saleorder.channel', string='Канал продаж')
|
||||
team_id = fields.Many2one('crm.team', string='Команда продаж')
|
||||
order_days_ids = fields.Many2many(comodel_name='contract.day', relation='orderdays', string='Дни доставки',
|
||||
column1='contract_id', column2='day_id')
|
||||
shipment_days_ids = fields.Many2many(comodel_name='contract.day', relation='shipmentdays', string=_('Дни отгрузки'),
|
||||
shipment_days_ids = fields.Many2many(comodel_name='contract.day', relation='shipmentdays', string='Дни отгрузки',
|
||||
column1='contract_id',
|
||||
column2='day_id')
|
||||
# Доработка хедера договора
|
||||
partner_type = fields.Selection(string=_('Тип контрагента'), selection=[
|
||||
partner_type = fields.Selection(string='Тип контрагента', selection=[
|
||||
('person', 'Физ. лицо'),
|
||||
('company_ip', 'ИП'),
|
||||
('company', 'Юр. лицо')
|
||||
], required=True)
|
||||
contract_header = fields.Html(_('Шапка договора'))
|
||||
contract_header = fields.Html('Шапка договора')
|
||||
|
||||
@api.onchange('partner_type')
|
||||
def generate_contract_header(self):
|
||||
@ -94,7 +94,7 @@ class PartnerContractCustomer(models.Model):
|
||||
def set_pid(self):
|
||||
self.partner_id = self.sec_partner_id.parent_id if self.sec_partner_id.parent_id else self.sec_partner_id
|
||||
|
||||
def _expand_states(self, states, domain):
|
||||
def _expand_states(self, states, domain, order):
|
||||
return [key for key, val in type(self).state.selection]
|
||||
|
||||
def copy_it(self):
|
||||
@ -218,8 +218,8 @@ class PartnerContractCustomer(models.Model):
|
||||
if self.saleorder_id:
|
||||
return self.saleorder_id.print_contract()
|
||||
else:
|
||||
raise exceptions.UserError(_(
|
||||
'Вы не можете напечатать договор с Клиентом, потому что нет связи с Заказом. Нужно зайти в Заказ и привязать этот договор.'))
|
||||
raise exceptions.UserError(
|
||||
'Вы не можете напечатать договор с Клиентом, потому что нет связи с Заказом. Нужно зайти в Заказ и привязать этот договор.')
|
||||
|
||||
def contract_action_confirm(self):
|
||||
if self.state == 'draft':
|
||||
@ -249,7 +249,7 @@ class PartnerContractCustomer(models.Model):
|
||||
def check_name(self):
|
||||
obj = self.search([('name', '=', self.name), ('id', '!=', self.id), ('state', '!=', 'closed')])
|
||||
if obj:
|
||||
raise exceptions.ValidationError(_('Договор с таким номером уже существует'))
|
||||
raise exceptions.ValidationError('Договор с таким номером уже существует')
|
||||
|
||||
"""
|
||||
@api.constrains('profile_id')
|
||||
@ -270,8 +270,8 @@ class PartnerContractCustomer(models.Model):
|
||||
class Partner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
contract_count = fields.Integer(string=_('Договоры'), compute='get_count_contract')
|
||||
pol = fields.Selection(string=_("Пол"), selection=[('m', 'Муж.'), ('j', 'Жен'), ], required=False)
|
||||
contract_count = fields.Integer(string='Договоры', compute='get_count_contract')
|
||||
pol = fields.Selection(string="Пол", selection=[('m', 'Муж.'), ('j', 'Жен'), ], required=False)
|
||||
type = fields.Selection(selection_add=[('director', 'Директор')])
|
||||
|
||||
def get_count_contract(self):
|
||||
@ -306,8 +306,8 @@ class ContractLine(models.Model):
|
||||
|
||||
class AllowedProfiles(models.Model):
|
||||
_name = 'contract.allowed.profiles'
|
||||
name = fields.Char(string=_('Одновременно включены следующие виды договоров:'))
|
||||
allowed_profiles = fields.Many2many('contract.profile', string=_('Виды договоров'), required=True)
|
||||
name = fields.Char(string='Одновременно включены следующие виды договоров:')
|
||||
allowed_profiles = fields.Many2many('contract.profile', string='Виды договоров', required=True)
|
||||
|
||||
@api.onchange('allowed_profiles')
|
||||
def set_name(self):
|
||||
@ -321,14 +321,14 @@ class AllowedProfiles(models.Model):
|
||||
|
||||
class ContractProfile(models.Model):
|
||||
_name = 'contract.profile'
|
||||
name = fields.Char(string=_('Вид договора'), required=True)
|
||||
payable_account_id = fields.Many2one('account.account', string=_('Счет кредиторской задолженности'), required=True)
|
||||
receivable_account_id = fields.Many2one('account.account', string=_('Счет дебиторской задолженности'), required=True)
|
||||
max_receivable_id = fields.Float(string=_('Максимальная деб. задолженность'), required=True)
|
||||
payment_term_id = fields.Many2one('account.payment.term', string=_('Условие оплаты'), required=True)
|
||||
journal_id = fields.Many2one('account.journal', string=_('Журнал'), required=True)
|
||||
name = fields.Char(string='Вид договора', required=True)
|
||||
payable_account_id = fields.Many2one('account.account', string='Счет кредиторской задолженности', required=True)
|
||||
receivable_account_id = fields.Many2one('account.account', string='Счет дебиторской задолженности', required=True)
|
||||
max_receivable_id = fields.Float(string='Максимальная деб. задолженность', required=True)
|
||||
payment_term_id = fields.Many2one('account.payment.term', string='Условие оплаты', required=True)
|
||||
journal_id = fields.Many2one('account.journal', string='Журнал', required=True)
|
||||
|
||||
|
||||
class ContractDay(models.Model):
|
||||
_name = 'contract.day'
|
||||
name = fields.Char(_('День'))
|
||||
name = fields.Char('День')
|
||||
|
128
l10n_ru_contract/models/invoice_saleorder.py
Normal file
128
l10n_ru_contract/models/invoice_saleorder.py
Normal file
@ -0,0 +1,128 @@
|
||||
from odoo import api, fields, models, exceptions
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class contract_sale_order(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
mt_contractid = fields.Many2one('partner.contract.customer', string='Номер договора')
|
||||
sec_partner_id = fields.Many2one('res.partner', string='Контрагент', store=True, compute='get_pid')
|
||||
stamp = fields.Boolean(string='Печать и подпись', related='mt_contractid.stamp')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def get_pid(self):
|
||||
for s in self:
|
||||
s.sec_partner_id = s.partner_id.parent_id if s.partner_id.parent_id else s.partner_id
|
||||
|
||||
@api.onchange('mt_contractid')
|
||||
def set_ons(self):
|
||||
if self.mt_contractid:
|
||||
self.payment_term_id = self.mt_contractid.payment_term_id
|
||||
|
||||
@api.constrains('state')
|
||||
def late_payment_check(self):
|
||||
if self.mt_contractid:
|
||||
if self.state == 'sale':
|
||||
late_invoices_count = 0
|
||||
max_receivable = self.mt_contractid.profile_id.max_receivable_id # макс. деб. задолженность в договоре
|
||||
# ищу просроченные инвойсы контрагента указанного в заказе со стейтом "Подтверждено"
|
||||
invoices_obj = self.env['account.move'].search([('partner_id', '=', self.partner_id.id),
|
||||
('state', '=', 'posted'),
|
||||
('invoice_date_due', '<', datetime.now().date())])
|
||||
|
||||
for invoice in invoices_obj:
|
||||
late_invoices_count += invoice.amount_residual # складываю деб. задолженность по просроченным инвойсам
|
||||
|
||||
if late_invoices_count > max_receivable:
|
||||
raise exceptions.ValidationError(
|
||||
f'Нельзя подтвердить заказ, так как у контрагента {self.sec_partner_id.name} нарушено '
|
||||
f'условие по дебиторской задолженности.\n\n'
|
||||
f'Контрагент {self.sec_partner_id.name} должен {late_invoices_count}руб.\n'
|
||||
f'Максимальная дебиторская задолженность указанная в '
|
||||
f'договоре №{self.mt_contractid.name} - {max_receivable}руб.\n\n'
|
||||
f'Проверьте следующие неоплаченные счета контрагента:\n'
|
||||
f'{", ".join([invoice.name for invoice in invoices_obj])}')
|
||||
|
||||
# при выбора счета "Обычный счет"
|
||||
@api.model
|
||||
def _create_invoices(self, grouped=False, final=False, date=None):
|
||||
res = super(contract_sale_order, self)._create_invoices(grouped, final, date)
|
||||
if self.mt_contractid:
|
||||
res.write({'mt_contractid': self.mt_contractid,
|
||||
'journal_id': self.mt_contractid.profile_id.journal_id})
|
||||
# 'invoice_payment_term_id': self.mt_contractid.profile_id.payment_term_id
|
||||
# 'line_ids': [(0, 0, {
|
||||
# 'account_id': self.mt_contractid.profile_id.receivable_account_id.id})]
|
||||
return res
|
||||
|
||||
|
||||
class ContractCreateInvoice(models.TransientModel):
|
||||
_inherit = 'sale.advance.payment.inv'
|
||||
|
||||
# при выбора счета "Авансовый платеж"
|
||||
@api.model
|
||||
def _create_invoice(self, order, so_line, amount):
|
||||
res = super(ContractCreateInvoice, self)._create_invoice(order, so_line, amount)
|
||||
if order.mt_contractid:
|
||||
res.write({'mt_contractid': order.mt_contractid,
|
||||
'journal_id': order.mt_contractid.profile_id.journal_id, })
|
||||
# 'invoice_payment_term_id': order.mt_contractid.profile_id.payment_term_id
|
||||
return res
|
||||
|
||||
|
||||
class contract_invoice(models.Model):
|
||||
_inherit = 'account.move'
|
||||
mt_contractid = fields.Many2one('partner.contract.customer', string='Номер договора')
|
||||
sf_number = fields.Char(string='Номер с/ф')
|
||||
osnovanie = fields.Char(string='Основание')
|
||||
sec_partner_id = fields.Many2one('res.partner', string='Контрагент', store=True, compute='get_pid')
|
||||
stamp = fields.Boolean(string='Печать и подпись', related='mt_contractid.stamp')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def get_pid(self):
|
||||
for s in self:
|
||||
s.sec_partner_id = s.partner_id.parent_id if s.partner_id.parent_id else s.partner_id
|
||||
|
||||
@api.onchange('mt_contractid')
|
||||
def set_ons(self):
|
||||
if self.mt_contractid:
|
||||
self.osnovanie = 'Договор № ' + self.mt_contractid.name + ' от ' + fields.Datetime.from_string(
|
||||
self.mt_contractid.date_start).strftime("%d.%m.%Y")
|
||||
|
||||
@api.constrains('state')
|
||||
def invoice_fields_check(self):
|
||||
for s in self:
|
||||
if s.state == 'posted':
|
||||
if s.mt_contractid:
|
||||
errors_list = []
|
||||
journal_in_contract = s.mt_contractid.profile_id.journal_id
|
||||
payment_term_in_contract = s.mt_contractid.profile_id.payment_term_id
|
||||
receivable_in_contract = s.mt_contractid.profile_id.receivable_account_id
|
||||
|
||||
if journal_in_contract != s.journal_id:
|
||||
errors_list.append(f'Отличается Журнал - [{s.journal_id.name}] '
|
||||
f'и указанный в договоре №{s.mt_contractid.name} '
|
||||
f'Журнал - [{journal_in_contract.name}]\n\n')
|
||||
|
||||
if payment_term_in_contract != s.invoice_payment_term_id:
|
||||
errors_list.append(f'Отличается поле "Условие оплаты" в инвойсе '
|
||||
f'[Условие оплаты - {s.invoice_payment_term_id.name}] '
|
||||
f'и указанный в договоре №{s.mt_contractid.name} '
|
||||
f'[Условие оплаты - {payment_term_in_contract.name}]\n\n')
|
||||
|
||||
if receivable_in_contract not in s.line_ids.account_id:
|
||||
errors_list.append(f'Отличается поле "Счет дебиторской задолженности" в инвойсе '
|
||||
f'и указанный в договоре №{s.mt_contractid.name}')
|
||||
|
||||
if errors_list:
|
||||
raise exceptions.ValidationError(''.join(errors_list))
|
||||
|
||||
|
||||
class contact_purchase_order(models.Model):
|
||||
_inherit = 'purchase.order'
|
||||
mt_contractid = fields.Many2one('partner.contract.customer', string='Номер договора')
|
||||
sec_partner_id = fields.Many2one('res.partner', string='Контрагент', store=True, compute='get_pid')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def get_pid(self):
|
||||
for s in self:
|
||||
s.sec_partner_id = s.partner_id.parent_id if s.partner_id.parent_id else s.partner_id
|
@ -1,13 +0,0 @@
|
||||
from odoo import api, fields, models, exceptions, _
|
||||
|
||||
|
||||
class PurchaseOrder(models.Model):
|
||||
_inherit = 'purchase.order'
|
||||
|
||||
mt_contract_id = fields.Many2one('partner.contract.customer', string=_('Номер договора'))
|
||||
sec_partner_id = fields.Many2one('res.partner', string=_('Контрагент'), store=True, compute='_compute_get_pid')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def _compute_get_pid(self):
|
||||
for s in self:
|
||||
s.sec_partner_id = s.partner_id.parent_id if s.partner_id.parent_id else s.partner_id
|
@ -1,18 +0,0 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class ContractCreateInvoice(models.TransientModel):
|
||||
_inherit = 'sale.advance.payment.inv'
|
||||
|
||||
# # при выбора счета "Авансовый платеж"
|
||||
# @api.model
|
||||
# def _create_invoice(self, order, so_line, amount):
|
||||
# res = super(ContractCreateInvoice, self)._create_invoice(order, so_line, amount)
|
||||
# if order.mt_contract_id:
|
||||
# res.write({'mt_contract_id': order.mt_contract_id,
|
||||
# 'journal_id': order.mt_contract_id.profile_id.journal_id, })
|
||||
# return res
|
||||
def _prepare_invoice_values(self, order, name, amount):
|
||||
invoice_vals = super(ContractCreateInvoice, self)._prepare_invoice_values(order, name, amount)
|
||||
invoice_vals['mt_contract_id'] = order.mt_contract_id.id
|
||||
return invoice_vals
|
@ -1,62 +0,0 @@
|
||||
from odoo import api, fields, models, exceptions, _
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
mt_contract_id = fields.Many2one('partner.contract.customer', string=_('Номер договора'))
|
||||
sec_partner_id = fields.Many2one('res.partner', string=_('Контрагент'), store=True, compute='_compute_get_pid')
|
||||
stamp = fields.Boolean(string=_('Печать и подпись'), related='mt_contract_id.stamp')
|
||||
|
||||
@api.depends('partner_id')
|
||||
def _compute_get_pid(self):
|
||||
for s in self:
|
||||
s.sec_partner_id = s.partner_id.parent_id if s.partner_id.parent_id else s.partner_id
|
||||
|
||||
@api.onchange('mt_contract_id')
|
||||
def set_ons(self):
|
||||
if self.mt_contract_id:
|
||||
self.payment_term_id = self.mt_contract_id.payment_term_id
|
||||
|
||||
@api.constrains('state')
|
||||
def late_payment_check(self):
|
||||
if self.mt_contract_id:
|
||||
if self.state == 'sale':
|
||||
late_invoices_count = 0
|
||||
max_receivable = self.mt_contract_id.profile_id.max_receivable_id # макс. деб. задолженность в договоре
|
||||
# ищу просроченные инвойсы контрагента указанного в заказе со стейтом "Подтверждено"
|
||||
invoices_obj = self.env['account.move'].search([('partner_id', '=', self.partner_id.id),
|
||||
('state', '=', 'posted'),
|
||||
('invoice_date_due', '<', datetime.now().date())])
|
||||
|
||||
for invoice in invoices_obj:
|
||||
late_invoices_count += invoice.amount_residual # складываю деб. задолженность по просроченным инвойсам
|
||||
|
||||
if late_invoices_count > max_receivable:
|
||||
raise exceptions.ValidationError(
|
||||
f'Нельзя подтвердить заказ, так как у контрагента {self.sec_partner_id.name} нарушено '
|
||||
f'условие по дебиторской задолженности.\n\n'
|
||||
f'Контрагент {self.sec_partner_id.name} должен {late_invoices_count}руб.\n'
|
||||
f'Максимальная дебиторская задолженность указанная в '
|
||||
f'договоре №{self.mt_contract_id.name} - {max_receivable}руб.\n\n'
|
||||
f'Проверьте следующие неоплаченные счета контрагента:\n'
|
||||
f'{", ".join([invoice.name for invoice in invoices_obj])}')
|
||||
|
||||
# # при выбора счета "Обычный счет"
|
||||
# @api.model
|
||||
# def _create_invoices(self, grouped=False, final=False, date=None):
|
||||
# res = super(SaleOrder, self)._create_invoices(grouped, final, date)
|
||||
# if self.mt_contract_id:
|
||||
# res.write({'mt_contract_id': self.mt_contract_id,
|
||||
# 'journal_id': self.mt_contract_id.profile_id.journal_id})
|
||||
# return res
|
||||
def _get_invoice_grouping_keys(self):
|
||||
res = super(SaleOrder, self)._get_invoice_grouping_keys()
|
||||
res.append('mt_contract_id')
|
||||
return res #['company_id', 'partner_id', 'currency_id', 'mt_contractid']
|
||||
|
||||
def _prepare_invoice(self):
|
||||
invoice_vals = super(SaleOrder, self)._prepare_invoice()
|
||||
invoice_vals['mt_contract_id'] = self.mt_contract_id.id
|
||||
return invoice_vals
|
@ -1,4 +1,2 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import report_contract
|
||||
from . import report_contract_order
|
||||
from . import report_contract_invoice
|
||||
from . import report_contract,report_contract_order,report_contract_invoce
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -388,10 +388,10 @@
|
||||
<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="report_name">contract.report_contract_customer</field>
|
||||
<field name="report_file">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="binding_model_id" ref="contract.model_partner_contract_customer" />
|
||||
<field name="paperformat_id" ref="paperformat_a4" />
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
|
@ -2,8 +2,8 @@
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class ContractCustomerReportInvoice(models.AbstractModel):
|
||||
_name = 'contract.customer.report_invoice'
|
||||
class ContractCustomerReportOrder(models.AbstractModel):
|
||||
_name = 'contract.customer.report_invoce'
|
||||
|
||||
|
||||
def get_report_values(self, docids, data=None):
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<template id="report_contract_customer_invoice">
|
||||
<template id="report_contract_customer_invoce">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-if="o and 'company_id' in o">
|
||||
@ -23,9 +23,9 @@
|
||||
<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>
|
||||
<td class="R0C0"><t t-esc="o.mt_contractid.company_id.name or ''"/></td>
|
||||
<td class="R0C1">Договор <t t-esc="o.mt_contractid.name or ''"/> от <t
|
||||
t-esc="o.mt_contractid.date_start or ''"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -93,7 +93,7 @@
|
||||
<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_contract_id.name or ''"/></td>
|
||||
<td class="R0C0" colspan="2">Договор № <t t-esc="o.mt_contractid.name or ''"/></td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C0" colspan="2">на поставку продукции</td>
|
||||
@ -103,9 +103,9 @@
|
||||
<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="R0C1"><t t-esc="o.mt_contractid.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>
|
||||
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_start) or ''"/></td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C1"></td>
|
||||
@ -114,7 +114,7 @@
|
||||
<tr class="R0">
|
||||
<td class="R0C3" colspan="2">
|
||||
<span>
|
||||
<t t-raw="o.mt_contract_id.contract_header or ''"/>
|
||||
<t t-raw="o.mt_contractid.contract_header or ''"/>
|
||||
</span>
|
||||
</td>
|
||||
<tr class="R0">
|
||||
@ -122,7 +122,7 @@
|
||||
<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">
|
||||
<!--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>
|
||||
@ -142,7 +142,7 @@
|
||||
</tr-->
|
||||
</tbody>
|
||||
</table>
|
||||
<t t-foreach="o.mt_contract_id.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
|
||||
<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>
|
||||
@ -165,24 +165,24 @@
|
||||
<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>
|
||||
<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_contract_id.company_id.inn or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">ИНН <t
|
||||
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
|
||||
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_contract_id.name_dirprint1 or ''"/>
|
||||
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
|
||||
<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>
|
||||
@ -195,9 +195,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">КПП
|
||||
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type == 'company'">
|
||||
<t t-if="o.mt_contractid.partner_type == 'company'">
|
||||
<td class="R0C7rl" colspan="3">КПП
|
||||
<t t-esc="o.partner_id.kpp or ''"/>
|
||||
</td>
|
||||
@ -214,10 +214,10 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
@ -236,12 +236,12 @@
|
||||
<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 ''"/>
|
||||
<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_contract_id.img(o.company_id.stamp) or ''"/>
|
||||
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C6rl" colspan="3"></td>
|
||||
@ -281,8 +281,8 @@
|
||||
<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>
|
||||
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>
|
||||
@ -295,9 +295,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C1" colspan="4"><t
|
||||
t-esc="o.mt_contract_id.company_id.partner_id.city or ''"/></td>
|
||||
t-esc="o.mt_contractid.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>
|
||||
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>
|
||||
@ -305,7 +305,7 @@
|
||||
<tr class="R0">
|
||||
<td class="R0C3" colspan="8">
|
||||
<span>
|
||||
<t t-raw="o.mt_contract_id.contract_header or ''"/>
|
||||
<t t-raw="o.mt_contractid.contract_header or ''"/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -314,8 +314,8 @@
|
||||
</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 ''"/>.
|
||||
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">
|
||||
@ -363,18 +363,18 @@
|
||||
</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 ''"/>). В стоимость продукции входит стоимость
|
||||
t-esc="o.mt_contractid.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/>
|
||||
<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_contract_id.get_date_text(o.mt_contract_id.date_end) or ''"/><br/>
|
||||
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_end) or ''"/><br/>
|
||||
5. Срок действия настоящей спецификации ограничен и равен сроку отгрузки по условиям
|
||||
данной спецификации.
|
||||
</td>
|
||||
@ -403,24 +403,24 @@
|
||||
<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>
|
||||
<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_contract_id.company_id.inn or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">ИНН <t
|
||||
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
|
||||
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_contract_id.name_dirprint1 or ''"/>
|
||||
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
|
||||
<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>
|
||||
@ -433,9 +433,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">КПП
|
||||
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type == 'company'">
|
||||
<t t-if="o.mt_contractid.partner_type == 'company'">
|
||||
<td class="R0C7rl" colspan="3">КПП
|
||||
<t t-esc="o.partner_id.kpp or ''"/>
|
||||
</td>
|
||||
@ -452,10 +452,10 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
@ -474,12 +474,12 @@
|
||||
<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 ''"/>
|
||||
<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_contract_id.img(o.company_id.stamp) or ''"/>
|
||||
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C6rl" colspan="3"></td>
|
||||
@ -538,7 +538,7 @@
|
||||
<td class="R0C6tI">
|
||||
<SPAN>
|
||||
<t
|
||||
t-raw="o.stamp and o.mt_contract_id.img(company.chief_id.facsimile) or ''"/>
|
||||
t-raw="o.stamp and o.mt_contractid.img(company.chief_id.facsimile) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C0"></td>
|
||||
@ -578,12 +578,12 @@
|
||||
<field name="dpi">90</field>
|
||||
</record>
|
||||
|
||||
<record id="action_report_contract_customer_invoice" model="ir.actions.report">
|
||||
<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="report_name">contract.report_contract_customer_invoce</field>
|
||||
<field name="report_file">contract.report_contract_customer_invoce</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" />
|
@ -23,9 +23,9 @@
|
||||
<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>
|
||||
<td class="R0C0"><t t-esc="o.mt_contractid.company_id.name or ''"/></td>
|
||||
<td class="R0C1">Договор <t t-esc="o.mt_contractid.name or ''"/> от <t
|
||||
t-esc="o.mt_contractid.date_start or ''"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -93,7 +93,7 @@
|
||||
<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>
|
||||
<td class="R0C0" colspan="2">Договор № <t t-esc="o.mt_contractid.name or ''"/></td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C0" colspan="2">на поставку продукции</td>
|
||||
@ -103,9 +103,9 @@
|
||||
<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="R0C1"><t t-esc="o.mt_contractid.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>
|
||||
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_start) or ''"/></td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C1"></td>
|
||||
@ -114,7 +114,7 @@
|
||||
<tr class="R0">
|
||||
<td class="R0C3" colspan="2">
|
||||
<span>
|
||||
<t t-raw="o.mt_contract_id.contract_header or ''"/>
|
||||
<t t-raw="o.mt_contractid.contract_header or ''"/>
|
||||
</span>
|
||||
</td>
|
||||
<tr class="R0">
|
||||
@ -122,7 +122,7 @@
|
||||
<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">
|
||||
<!--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>
|
||||
@ -142,7 +142,7 @@
|
||||
</tr-->
|
||||
</tbody>
|
||||
</table>
|
||||
<t t-foreach="o.mt_contract_id.lines.sorted(key=lambda r: r.sequence, reverse=False)" t-as="line">
|
||||
<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>
|
||||
@ -165,24 +165,24 @@
|
||||
<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>
|
||||
<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_contract_id.company_id.inn or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">ИНН <t
|
||||
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
|
||||
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_contract_id.name_dirprint1 or ''"/>
|
||||
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
|
||||
<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>
|
||||
@ -195,9 +195,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">КПП
|
||||
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type == 'company'">
|
||||
<t t-if="o.mt_contractid.partner_type == 'company'">
|
||||
<td class="R0C7rl" colspan="3">КПП
|
||||
<t t-esc="o.partner_id.kpp or ''"/>
|
||||
</td>
|
||||
@ -214,10 +214,10 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
@ -236,12 +236,12 @@
|
||||
<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 ''"/>
|
||||
<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_contract_id.img(o.company_id.stamp) or ''"/>
|
||||
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C6rl" colspan="3"></td>
|
||||
@ -281,8 +281,8 @@
|
||||
<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>
|
||||
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>
|
||||
@ -295,9 +295,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C1" colspan="4"><t
|
||||
t-esc="o.mt_contract_id.company_id.partner_id.city or ''"/></td>
|
||||
t-esc="o.mt_contractid.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>
|
||||
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>
|
||||
@ -305,7 +305,7 @@
|
||||
<tr class="R0">
|
||||
<td class="R0C3" colspan="8">
|
||||
<span>
|
||||
<t t-raw="o.mt_contract_id.contract_header or ''"/>
|
||||
<t t-raw="o.mt_contractid.contract_header or ''"/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -314,8 +314,8 @@
|
||||
</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 ''"/>.
|
||||
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">
|
||||
@ -362,20 +362,20 @@
|
||||
</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 ''"/>). В стоимость продукции входит
|
||||
t-esc="o.mt_contractid.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/>
|
||||
<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.payment_term_id.name or ''"/> согласно выставленному
|
||||
счету
|
||||
Поставщика.<br/>
|
||||
4. Срок отгрузки: <t
|
||||
t-esc="o.mt_contract_id.get_date_text(o.mt_contract_id.date_end) or ''"/>
|
||||
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_end) or ''"/>
|
||||
<br/>
|
||||
5. Срок действия настоящей спецификации ограничен и равен сроку отгрузки по
|
||||
условиям данной спецификации.
|
||||
@ -405,24 +405,24 @@
|
||||
<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>
|
||||
<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_contract_id.company_id.inn or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">ИНН <t
|
||||
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
|
||||
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_contract_id.name_dirprint1 or ''"/>
|
||||
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
|
||||
<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>
|
||||
@ -435,9 +435,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">КПП
|
||||
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type == 'company'">
|
||||
<t t-if="o.mt_contractid.partner_type == 'company'">
|
||||
<td class="R0C7rl" colspan="3">КПП
|
||||
<t t-esc="o.partner_id.kpp or ''"/>
|
||||
</td>
|
||||
@ -454,10 +454,10 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
@ -476,12 +476,12 @@
|
||||
<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 ''"/>
|
||||
<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_contract_id.img(o.company_id.stamp) or ''"/>
|
||||
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C6rl" colspan="3"></td>
|
||||
@ -540,7 +540,7 @@
|
||||
<td class="R0C6tI">
|
||||
<SPAN>
|
||||
<t
|
||||
t-raw="o.stamp and o.mt_contract_id.img(company.chief_id.facsimile) or ''"/>
|
||||
t-raw="o.stamp and o.mt_contractid.img(company.chief_id.facsimile) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C0"></td>
|
||||
@ -584,8 +584,8 @@
|
||||
<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="report_name">contract.report_contract_customer_order</field>
|
||||
<field name="report_file">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" />
|
||||
|
@ -23,9 +23,9 @@
|
||||
<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>
|
||||
<td class="R0C0"><t t-esc="o.mt_contractid.company_id.name or ''"/></td>
|
||||
<td class="R0C1">Договор <t t-esc="o.mt_contractid.name or ''"/> от <t
|
||||
t-esc="o.mt_contractid.date_start or ''"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -96,8 +96,8 @@
|
||||
<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>
|
||||
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>
|
||||
@ -110,9 +110,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C1" colspan="4"><t
|
||||
t-esc="o.mt_contract_id.company_id.partner_id.city or ''"/></td>
|
||||
t-esc="o.mt_contractid.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>
|
||||
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>
|
||||
@ -120,7 +120,7 @@
|
||||
<tr class="R0">
|
||||
<td class="R0C3" colspan="8">
|
||||
<span>
|
||||
<t t-raw="o.mt_contract_id.contract_header or ''"/>
|
||||
<t t-raw="o.mt_contractid.contract_header or ''"/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@ -129,8 +129,8 @@
|
||||
</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 ''"/>.
|
||||
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">
|
||||
@ -177,18 +177,18 @@
|
||||
</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 ''"/>). В стоимость продукции входит стоимость
|
||||
t-esc="o.mt_contractid.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/>
|
||||
<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.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/>
|
||||
t-esc="o.mt_contractid.get_date_text(o.mt_contractid.date_end) or ''"/><br/>
|
||||
5. Срок действия настоящей спецификации ограничен и равен сроку отгрузки по условиям
|
||||
данной спецификации.
|
||||
</td>
|
||||
@ -217,24 +217,24 @@
|
||||
<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>
|
||||
<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_contract_id.company_id.inn or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.inn or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">ИНН <t
|
||||
t-esc="o.mt_contract_id.partner_id.inn or ''"/></td>
|
||||
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_contract_id.name_dirprint1 or ''"/>
|
||||
<t t-esc="o.mt_contractid.name_dirprint1 or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type in ['company', 'company_ip']">
|
||||
<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>
|
||||
@ -247,9 +247,9 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">КПП
|
||||
<t t-esc="o.mt_contract_id.company_id.kpp or ''"/>
|
||||
<t t-esc="o.mt_contractid.company_id.kpp or ''"/>
|
||||
</td>
|
||||
<t t-if="o.mt_contract_id.partner_type == 'company'">
|
||||
<t t-if="o.mt_contractid.partner_type == 'company'">
|
||||
<td class="R0C7rl" colspan="3">КПП
|
||||
<t t-esc="o.partner_id.kpp or ''"/>
|
||||
</td>
|
||||
@ -266,10 +266,10 @@
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
<td class="R0C6l" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.company_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.company_id) or ''"/>
|
||||
</td>
|
||||
<td class="R0C7rl" colspan="3">
|
||||
<t t-esc="o.mt_contract_id.address(o.partner_id) or ''"/>
|
||||
<t t-esc="o.mt_contractid.address(o.partner_id) or ''"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="R0">
|
||||
@ -288,12 +288,12 @@
|
||||
<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 ''"/>
|
||||
<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_contract_id.img(o.company_id.stamp) or ''"/>
|
||||
<t t-raw="o.stamp and o.mt_contractid.img(o.company_id.stamp) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C6rl" colspan="3"></td>
|
||||
@ -352,7 +352,7 @@
|
||||
<td class="R0C6tI">
|
||||
<SPAN>
|
||||
<t
|
||||
t-raw="o.stamp and o.mt_contract_id.img(company.chief_id.facsimile) or ''"/>
|
||||
t-raw="o.stamp and o.mt_contractid.img(company.chief_id.facsimile) or ''"/>
|
||||
</SPAN>
|
||||
</td>
|
||||
<td class="R0C0"></td>
|
||||
@ -396,8 +396,8 @@
|
||||
<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="report_name">contract.report_contract_customer_order1</field>
|
||||
<field name="report_file">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" />
|
||||
|
@ -36,14 +36,14 @@
|
||||
<field name="partner_id" readonly="state!='draft'"/>
|
||||
<field name="partner_type" readonly="state!='draft'"/>
|
||||
<!-- <field name="name_print"/>-->
|
||||
<field name="sec_partner_id" invisible="1"/><!-- reason: need-->
|
||||
<field name="sec_partner_id" invisible="1"/>
|
||||
<field name="company_id" readonly="state!='draft'"/>
|
||||
<!--<field name="name_dirprint"/>-->
|
||||
<field name="stamp"/>
|
||||
<field name="signed"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="payment_term_id" invisible="1"/> <!-- reason: need-->
|
||||
<field name="payment_term_id" invisible="1"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="team_id"/>
|
||||
|
||||
@ -72,11 +72,11 @@
|
||||
<notebook>
|
||||
<page string="Пункты договора" name="contract_lines">
|
||||
<field name="lines">
|
||||
<list editable="bottom">
|
||||
<tree editable="bottom">
|
||||
<field name='sequence' widget='handle'/>
|
||||
<field name="name"/>
|
||||
<field name="punct"/>
|
||||
</list>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Шапка договора" name="contract_header">
|
||||
@ -86,12 +86,11 @@
|
||||
|
||||
|
||||
</sheet>
|
||||
<chatter/>
|
||||
<!-- <div class="oe_chatter">-->
|
||||
<!-- <field name="message_follower_ids" widget="mail_followers"/>-->
|
||||
<!-- <field name="activity_ids" widget="mail_activity"/>-->
|
||||
<!-- <field name="message_ids" widget="mail_thread"/>-->
|
||||
<!-- </div>-->
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="activity_ids" widget="mail_activity"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@ -115,11 +114,11 @@
|
||||
<field name="name">Договор</field>
|
||||
<field name="model">partner.contract.customer</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Договоры">
|
||||
<tree string="Договоры">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="date_start"/>
|
||||
</list>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@ -143,7 +142,7 @@
|
||||
<field name="name">Договоры</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">partner.contract.customer</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Нет созданных контрактов
|
||||
@ -158,7 +157,7 @@
|
||||
<field name="name">Договоры</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">partner.contract.customer</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="domain">[('type', '=', 'supplier')]</field>
|
||||
<field name="help" type="html">
|
||||
|
||||
@ -175,7 +174,7 @@
|
||||
<field name="name">Договоры</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">partner.contract.customer</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="domain">[('type', '=', 'customer')]</field>
|
||||
<field name="help" type="html">
|
||||
|
||||
@ -192,14 +191,14 @@
|
||||
<field name="name">Настройка одновременно включенных договоров</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">contract.allowed.profiles</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="contract_profile_action" model="ir.actions.act_window">
|
||||
<field name="name">Виды договоров</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">contract.profile</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record id="contract_profile_view" model="ir.ui.view">
|
||||
@ -251,10 +250,10 @@
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="mt_contract_id"
|
||||
<field name="mt_contractid"
|
||||
domain="[('partner_id','=',sec_partner_id),('company_id','=',company_id)]"
|
||||
context="{'default_sec_partner_id':partner_id,'default_company_id':company_id,'default_type':'customer'}"/>
|
||||
<field name="sec_partner_id" invisible="1"/><!-- reason: need-->
|
||||
<field name="sec_partner_id" invisible="1"/>
|
||||
|
||||
</xpath>
|
||||
|
||||
@ -268,10 +267,10 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='origin']" position="after">
|
||||
|
||||
<field name="mt_contract_id"
|
||||
<field name="mt_contractid"
|
||||
domain="[('partner_id','=',sec_partner_id),('company_id','=',company_id)]"
|
||||
context="{'default_sec_partner_id':partner_id,'default_company_id':company_id,'default_type':'supplier'}"/>
|
||||
<field name="sec_partner_id" invisible="1"/><!-- reason: need-->
|
||||
<field name="sec_partner_id" invisible="1"/>
|
||||
|
||||
</xpath>
|
||||
|
||||
@ -285,12 +284,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='payment_reference']" position="after">
|
||||
|
||||
<field name="mt_contract_id"
|
||||
<field name="mt_contractid"
|
||||
domain="[('partner_id','=',sec_partner_id),('company_id','=',company_id)]"
|
||||
context="{'default_sec_partner_id':partner_id,'default_company_id':company_id,'default_type':'customer'}"/>
|
||||
<field name="sec_partner_id" invisible="1"/><!-- reason: need-->
|
||||
<field name="sec_partner_id" invisible="1"/>
|
||||
<field name="sf_number"/>
|
||||
<field name="osnovanie" invisible="1"/><!-- reason: need-->
|
||||
<field name="osnovanie" invisible="1"/>
|
||||
|
||||
</xpath>
|
||||
|
||||
@ -333,25 +332,27 @@
|
||||
|
||||
</field>
|
||||
</record>
|
||||
<menuitem name="Договоры" id="l10n_ru_contract.main" parent="sale.sale_menu_root"/>
|
||||
<menuitem name="Договоры" id="l10n_ru_contract.contracts" parent="l10n_ru_contract.main"
|
||||
action="l10n_ru_contract.contract_customer_action2"/>
|
||||
<menuitem name="Договоры" id="contract.main" parent="sale.sale_menu_root"/>
|
||||
<menuitem name="Договоры" id="contract.contracts" parent="contract.main"
|
||||
action="contract.contract_customer_action2"/>
|
||||
|
||||
<menuitem name="Договоры" id="l10n_ru_contract.main1" parent="purchase.menu_purchase_root"/>
|
||||
<menuitem name="Договоры" id="l10n_ru_contract.contracts1" parent="l10n_ru_contract.main1"
|
||||
action="l10n_ru_contract.contract_customer_action1"/>
|
||||
<menuitem name="Договоры" id="contract.main1" parent="purchase.menu_purchase_root"/>
|
||||
<menuitem name="Договоры" id="contract.contracts1" parent="contract.main1"
|
||||
action="contract.contract_customer_action1"/>
|
||||
|
||||
<menuitem name="Настройка" id="l10n_ru_contract.separator" parent="l10n_ru_contract.main"/>
|
||||
<menuitem name="Виды договоров" id="l10n_ru_contract.contract_profiles" parent="l10n_ru_contract.separator"
|
||||
action="l10n_ru_contract.contract_profile_action"/>
|
||||
<menuitem name="Включенные договора" id="l10n_ru_contract.contract_profile_setting" parent="l10n_ru_contract.separator"
|
||||
action="l10n_ru_contract.contract_allowed_profiles_action"/>
|
||||
<menuitem name="Настройка" id="separator" parent="contract.main"/>
|
||||
<menuitem name="Виды договоров" id="contract_profiles" parent="separator"
|
||||
action="contract.contract_profile_action"/>
|
||||
<menuitem name="Включенные договора" id="contract_profile_setting" parent="separator"
|
||||
action="contract.contract_allowed_profiles_action"/>
|
||||
|
||||
|
||||
<menuitem name="Настройка" id="separator1" parent="contract.main1"/>
|
||||
<menuitem name="Виды договоров" id="contract_profiles1" parent="separator1"
|
||||
action="contract.contract_profile_action"/>
|
||||
<menuitem name="Включенные договора" id="contract_profile_setting1" parent="separator1"
|
||||
action="contract.contract_allowed_profiles_action"/>
|
||||
|
||||
|
||||
<menuitem name="Настройка" id="l10n_ru_contract.separator1" parent="l10n_ru_contract.main1"/>
|
||||
<menuitem name="Виды договоров" id="l10n_ru_contract.contract_profiles1" parent="l10n_ru_contract.separator1"
|
||||
action="l10n_ru_contract.contract_profile_action"/>
|
||||
<menuitem name="Включенные договора" id="l10n_ru_contract.contract_profile_setting1" parent="l10n_ru_contract.separator1"
|
||||
action="l10n_ru_contract.contract_allowed_profiles_action"/>
|
||||
</data>
|
||||
</odoo>
|
||||
|
@ -1,37 +0,0 @@
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<!--Email template -->
|
||||
<record id="email_template_order_special" model="mail.template">
|
||||
<field name="name">Шаблон почты</field>
|
||||
<field name="model_id" ref="sale.model_sale_order" />
|
||||
<field name="email_from">${(object.company_id.email |safe}</field>
|
||||
<field name="email_to" >${object.partner_id.email}</field>
|
||||
<field name="subject">Заказ ${object.name or 'n/a' }</field>
|
||||
<field name="auto_delete" eval="True"/>
|
||||
<!--field name="report_template" ref="action_report_contract_customer_order1"/-->
|
||||
<!--field name="report_name">Спецификация к заказу</field-->
|
||||
<!--field name="report_name">Спецификация к заказу ${(object.name or '')}</field-->
|
||||
<!--field name="lang">${object.partner_id.lang}</field-->
|
||||
<field name="body_html"><![CDATA[
|
||||
<p></p>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="email_template_contract2" model="mail.template">
|
||||
<field name="name">Договор</field>
|
||||
<field name="model_id" ref="l10n_ru_contract.model_partner_contract_customer" />
|
||||
<field name="email_from">${(object.company_id.email |safe}</field>
|
||||
<field name="email_to" >${object.partner_id.email}</field>
|
||||
<field name="subject">Договор №${(object.name or 'n/a')} ${(object.company_id.name or 'n/a')} - ${(object.partner_id.parent_id.name or object.partner_id.name or 'n/a')} от ${(object.date_start or 'n/a')}</field>
|
||||
<field name="auto_delete" eval="True"/>
|
||||
<!--field name="report_template" ref="action_report_contract_customer"/-->
|
||||
<!--field name="report_name">Договор №${(object.name or 'n/a')}</field-->
|
||||
<field name="lang">${object.partner_id.lang}</field>
|
||||
<field name="body_html"><![CDATA[
|
||||
<p></p>
|
||||
]]>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
@ -1,38 +0,0 @@
|
||||
# Российская локализация - Документы
|
||||
name: l10n_ru_doc
|
||||
|
||||
## Описание
|
||||
Модуль для печати документов в соответствии с законодательством России.
|
||||
|
||||
##Возможности:
|
||||
* Товарная накладная (ТОРГ-12)
|
||||
* Счет на оплату (по форме 1С)
|
||||
* Счет-фактура
|
||||
* Акт выполненных работ
|
||||
* Универсальный передаточный документ
|
||||
|
||||
### Товарная накладная (ТОРГ-12)
|
||||
#### Для печати:
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Отчет "Товарная накладная (ТОРГ-12)".
|
||||
|
||||
### Счет на оплату (по форме 1С)
|
||||
1. Меню Продажи - Заказ продаж (sale.order));
|
||||
2. Отчет "Счет по форме 1С".
|
||||
|
||||
### Счет-фактура
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Отчет "Счет-фактура".
|
||||
|
||||
### Акт выполненных работ
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Отчет "Акт выполненных работ".
|
||||
|
||||
### Универсальный передаточный документ
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. В двух вариантах:отчет "Универсальный передаточный документ(УПД)"
|
||||
|
||||
2.1. Отчет "Универсальный передаточный документ(УПД)";
|
||||
|
||||
2.2. Отчет "УПД без печатей";
|
||||
|
@ -1,54 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "Российская локализация - Документы",
|
||||
'name': "Russia - Documents",
|
||||
|
||||
'summary': "Первичные документы",
|
||||
|
||||
'description': """
|
||||
Модуль для печати документов в соответствии с законодательством России.
|
||||
The module for print documents in accordance laws of Russia.
|
||||
============================================================
|
||||
Возможности:
|
||||
* Товарная накладная (ТОРГ-12)
|
||||
* Счет на оплату (по форме 1С)
|
||||
* Счет на оплату
|
||||
* Счет-фактура
|
||||
* Акт выполненных работ
|
||||
* Универсальный передаточный документ
|
||||
|
||||
Для печати:
|
||||
Товарная накладная (ТОРГ-12)
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Отчет "Товарная накладная (ТОРГ-12)".
|
||||
|
||||
Счет на оплату (по форме 1С)
|
||||
1. Меню Продажи - Заказ продаж (sale.order));
|
||||
2. Отчет "Счет по форме 1С".
|
||||
|
||||
Счет-фактура
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Отчет "Счет-фактура".
|
||||
|
||||
Акт выполненных работ
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Отчет "Акт выполненных работ".
|
||||
|
||||
Универсальный передаточный документ
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. В двух вариантах:отчет "Универсальный передаточный документ(УПД)"
|
||||
2.1. Отчет "Универсальный передаточный документ(УПД)";
|
||||
2.2. Отчет "УПД без печатей";
|
||||
|
||||
* Вывод подписей и печати
|
||||
""",
|
||||
|
||||
'author': "CodeUP and MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
'author': "CodUP and MKLab",
|
||||
'website': "https://inf-centre.ru",
|
||||
|
||||
'license': 'AGPL-3',
|
||||
'category': 'Localization',
|
||||
'version': '0.1',
|
||||
'version': '17.0.2024.06.28',
|
||||
|
||||
'depends': ['base', 'sale', 'account', 'sale_stock', 'uom', 'l10n_ru_base'],
|
||||
'depends': ['base','sale','account','sale_stock','uom'],
|
||||
|
||||
'external_dependencies': {'python': ['pytils']},
|
||||
'external_dependencies': {'python' : ['pytils']},
|
||||
|
||||
'data': [
|
||||
'views/account_invoice_view.xml',
|
||||
|
BIN
l10n_ru_doc/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
l10n_ru_doc/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_doc/__pycache__/report_helper.cpython-310.pyc
Normal file
BIN
l10n_ru_doc/__pycache__/report_helper.cpython-310.pyc
Normal file
Binary file not shown.
@ -39,29 +39,29 @@ class AccountInvoice(models.Model):
|
||||
|
||||
s.payment_text = payment_text
|
||||
|
||||
# def action_bill_sent(self):
|
||||
# assert len(self) == 1, 'This option should only be used for a single id at a time.'
|
||||
# template = self.env.ref('account.email_template_edi_invoice', False)
|
||||
# compose_form = self.env.ref('mail.email_compose_message_wizard_form', False)
|
||||
# ctx = {
|
||||
# 'default_model': 'account.move',
|
||||
# 'default_res_id': self.id,
|
||||
# 'default_use_template': bool(template),
|
||||
# 'default_template_id': template.id,
|
||||
# 'default_composition_mode': 'comment',
|
||||
# 'mark_invoice_as_sent': True,
|
||||
# }
|
||||
# return {
|
||||
# 'name': 'Compose Email',
|
||||
# 'type': 'ir.actions.act_window',
|
||||
# 'view_type': 'form',
|
||||
# 'view_mode': 'form',
|
||||
# 'res_model': 'mail.compose.message',
|
||||
# 'views': [(compose_form.id, 'form')],
|
||||
# 'view_id': compose_form.id,
|
||||
# 'target': 'new',
|
||||
# 'context': ctx,
|
||||
# }
|
||||
def action_bill_sent(self):
|
||||
assert len(self) == 1, 'This option should only be used for a single id at a time.'
|
||||
template = self.env.ref('account.email_template_edi_invoice', False)
|
||||
compose_form = self.env.ref('mail.email_compose_message_wizard_form', False)
|
||||
ctx = {
|
||||
'default_model': 'account.move',
|
||||
'default_res_id': self.id,
|
||||
'default_use_template': bool(template),
|
||||
'default_template_id': template.id,
|
||||
'default_composition_mode': 'comment',
|
||||
'mark_invoice_as_sent': True,
|
||||
}
|
||||
return {
|
||||
'name': 'Compose Email',
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'mail.compose.message',
|
||||
'views': [(compose_form.id, 'form')],
|
||||
'view_id': compose_form.id,
|
||||
'target': 'new',
|
||||
'context': ctx,
|
||||
}
|
||||
|
||||
def bill_print(self):
|
||||
assert len(self) == 1, 'This option should only be used for a single id at a time.'
|
||||
@ -69,10 +69,9 @@ class AccountInvoice(models.Model):
|
||||
|
||||
def get_delivery_doc_name(self):
|
||||
for s in self:
|
||||
if s:
|
||||
pickings = []
|
||||
pickings_list = '0'
|
||||
orders = self.env['sale.order'].sudo().search([('name','=',s.invoice_origin)]) if s.invoice_origin else []
|
||||
orders = self.env['sale.order'].sudo().search([('name','=',s.invoice_origin)])
|
||||
for o in orders:
|
||||
if o.picking_ids:
|
||||
for p in o.picking_ids:
|
||||
@ -81,29 +80,24 @@ class AccountInvoice(models.Model):
|
||||
pickings_list = ';'.join(pickings)
|
||||
if pickings_list != '0':
|
||||
return pickings_list
|
||||
if s.name and s.name.find('/') > -1:
|
||||
if s.name.find('/') > -1:
|
||||
return 'УПД № ' + s.name[len(s.name) - 4:]
|
||||
return 'УПД № ' + str(s.name) if s.name else ''
|
||||
|
||||
return 'УПД № ' + s.name
|
||||
|
||||
def get_delivery_doc_date(self):
|
||||
for s in self:
|
||||
if s:
|
||||
delivery_dates = []
|
||||
pickings = []
|
||||
orders = self.env['sale.order'].sudo().search([('name', '=', s.invoice_origin)])
|
||||
pickings_list = '0'
|
||||
orders = self.env['sale.order'].sudo().search([('name','=',s.invoice_origin)])
|
||||
for o in orders:
|
||||
if o.picking_ids:
|
||||
for p in o.picking_ids:
|
||||
if p.date:
|
||||
formatted_date = datetime.strftime(p.date, '%d.%m.%Y')
|
||||
pickings.append(formatted_date)
|
||||
if pickings and len(pickings)>0:
|
||||
delivery_dates.append(';'.join(pickings))
|
||||
else:
|
||||
if s.date:
|
||||
delivery_dates.append(datetime.strftime(s.date, '%d.%m.%Y'))
|
||||
return delivery_dates
|
||||
pickings.append(datetime.strftime(p.date, '%d.%m.%Y'))
|
||||
if len(pickings)>0:
|
||||
pickings_list = ';'.join(pickings)
|
||||
if pickings_list != '0':
|
||||
return pickings_list
|
||||
return datetime.strftime(s.date, '%d.%m.%Y')
|
||||
|
||||
def get_function_partner(self, partner=False, type='director'):
|
||||
if partner:
|
||||
|
@ -97,7 +97,7 @@ class QWebHelper(object):
|
||||
repr.append("р/сч " + bank.acc_number)
|
||||
if bank and bank.bank_name:
|
||||
repr.append("в банке " + bank.bank_name)
|
||||
if bank and bank.bank_bic:
|
||||
if bank and bank.banvk_bic:
|
||||
repr.append("БИК " + bank.bank_bic)
|
||||
if bank and bank.bank_corr_acc:
|
||||
repr.append("к/с " + bank.bank_corr_acc)
|
||||
|
@ -7,11 +7,11 @@
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- <data>-->
|
||||
<!-- <button name="action_invoice_sent" position="attributes">-->
|
||||
<!-- <attribute name="name">action_bill_sent</attribute>-->
|
||||
<!-- </button>-->
|
||||
<!-- </data>-->
|
||||
<data>
|
||||
<button name="action_invoice_sent" position="attributes">
|
||||
<attribute name="name">action_bill_sent</attribute>
|
||||
</button>
|
||||
</data>
|
||||
<xpath expr="//group[@id='header_left_group']" position="inside">
|
||||
|
||||
<field name="kladov"/>
|
||||
@ -20,11 +20,11 @@
|
||||
|
||||
<field name="transport"/>
|
||||
<field name="osnovanie"/>
|
||||
<field name="only_service" invisible="1"/> <!-- reason: need-->
|
||||
<field name="only_service" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//page[@name='invoice_tab']/field[@name='invoice_line_ids']/list/field[@name='tax_ids']" position="after">
|
||||
<field name="price_total_pf" column_invisible="True"/><!-- reason: need-->
|
||||
<xpath expr="//page[@name='invoice_tab']/field[@name='invoice_line_ids']/tree/field[@name='tax_ids']" position="after">
|
||||
<field name="price_total_pf" column_invisible="True"/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='vat']" position="after">
|
||||
<field name="inn" invisible="True"/><!-- reason: need-->
|
||||
<field name="inn" invisible="True"/>
|
||||
<field name="kpp"/>
|
||||
<field name="okpo"/>
|
||||
</xpath>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='vat']" position="after">
|
||||
<field name="inn" invisible="True"/> <!-- reason: need-->
|
||||
<field name="inn" invisible="True"/>
|
||||
<field name="kpp" invisible="is_company==False"/>
|
||||
<field name="okpo" invisible="is_company==False"/>
|
||||
<field name="ogrn" invisible="is_company==False"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<field name="model">uom.category</field>
|
||||
<field name="inherit_id" ref="uom.product_uom_categ_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='uom_ids']/list/field[@name='name']" position="after">
|
||||
<xpath expr="//field[@name='uom_ids']/tree/field[@name='name']" position="after">
|
||||
<field name="kod"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Российская локализация - УПД в xml-формате
|
||||
name: l10n_ru_upd_xml
|
||||
|
||||
## Описание
|
||||
Формирует универсальный передаточный документ в формате XML.
|
||||
|
||||
###Для печати:
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Кнопка "Печать УПД в xml-формате".
|
@ -1,3 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import controllers
|
||||
from . import models
|
||||
from . import reports
|
||||
|
@ -1,45 +1,51 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "Российская локализация - УПД в xml-формате",
|
||||
'name': "Печать УПД в xml формате",
|
||||
|
||||
'summary': """
|
||||
Формирует УПД в формате XML, формат 5.01""",
|
||||
'summary': "Формирует УПД в формате XML, формат 5.01",
|
||||
|
||||
'description': """
|
||||
Формирует УПД в формате XML.
|
||||
|
||||
Для печати:
|
||||
1. Меню Бухгалтерия - Клиенты - Счета (account.move);
|
||||
2. Кнопка "Печать УПД в xml-формате".
|
||||
Формирует УПД в формате XML, формат 5.01
|
||||
""",
|
||||
|
||||
'author': "MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
'author': "MKLab",
|
||||
'website': "https://inf-centre.ru",
|
||||
|
||||
'category': 'Uncategorized',
|
||||
'version': '0.1',
|
||||
"depends": ["web", "base", "account", "l10n_ru_doc", 'l10n_ru_base'],
|
||||
"data": [
|
||||
#"views/webclient_templates.xml",
|
||||
"views/ir_actions_report_view.xml",
|
||||
"views/res_partner_view.xml",
|
||||
"views/res_company_view.xml",
|
||||
"views/res_users_view.xml",
|
||||
"views/views_uom_okei.xml",
|
||||
"views/view_account_move.xml",
|
||||
"reports/upd_report.xml",
|
||||
"reports/report.xml",
|
||||
# Categories can be used to filter modules in modules listing
|
||||
# Check https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/data/ir_module_category_data.xml
|
||||
# for the full list
|
||||
'category': 'Localization',
|
||||
'version': '17.0.1.230710',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
'depends': ['web','base','account','l10n_ru_doc','contract'],
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
'views/ir_actions_report_view.xml',
|
||||
'views/res_partner_view.xml',
|
||||
'views/res_company_view.xml',
|
||||
'views/res_users_view.xml',
|
||||
'views/views_uom_okei.xml',
|
||||
'views/view_move.xml',
|
||||
'reports/report.xml',
|
||||
'reports/upd_report.xml',
|
||||
],
|
||||
|
||||
"assets": {
|
||||
"web.assets_backend": [
|
||||
"l10n_ru_upd_xml/static/src/js/report/action_manager_report.js",
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'upd_xml/static/src/js/report/action_manager_report.js',
|
||||
],
|
||||
},
|
||||
# only loaded in demonstration mode
|
||||
'demo': [
|
||||
'demo/demo.xml',
|
||||
],
|
||||
|
||||
"external_dependencies": {
|
||||
"python": [
|
||||
"lxml"
|
||||
'external_dependencies': {
|
||||
'python': [
|
||||
'lxml'
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
|
BIN
l10n_ru_upd_xml/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import main
|
||||
from . import controllers
|
||||
|
BIN
l10n_ru_upd_xml/controllers/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/controllers/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
Binary file not shown.
@ -1,7 +1,8 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import ir_actions_report
|
||||
from . import res_company
|
||||
from . import res_partner
|
||||
from . import res_users
|
||||
from . import uom_uom
|
||||
from . import account_move
|
||||
from . import account_move_line
|
||||
from . import uom_okei
|
||||
from . import move
|
||||
|
BIN
l10n_ru_upd_xml/models/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/models/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
l10n_ru_upd_xml/models/__pycache__/move.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/models/__pycache__/move.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_upd_xml/models/__pycache__/res_company.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/models/__pycache__/res_company.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_upd_xml/models/__pycache__/res_partner.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/models/__pycache__/res_partner.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_upd_xml/models/__pycache__/res_users.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/models/__pycache__/res_users.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_upd_xml/models/__pycache__/uom_okei.cpython-310.pyc
Normal file
BIN
l10n_ru_upd_xml/models/__pycache__/uom_okei.cpython-310.pyc
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user