forked from Rudoo/L10n_ru
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2c894fe74b | ||
![]() |
e07335deaa |
@ -1,93 +0,0 @@
|
||||
# act_revise
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.inf-centre.ru/mklab-base/l10n-russia/act_revise.git
|
||||
git branch -M v17-dev
|
||||
git push -uf origin v17-dev
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.inf-centre.ru/mklab-base/l10n-russia/act_revise/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
@ -1,93 +0,0 @@
|
||||
# Base Russian Localization
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.inf-centre.ru/mklab-base/l10n-russia/base_russian_localization.git
|
||||
git branch -M v17-dev
|
||||
git push -uf origin v17-dev
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.inf-centre.ru/mklab-base/l10n-russia/base_russian_localization/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
@ -1,109 +0,0 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_russian_localization
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 17.0+e-20240904\n"
|
||||
"Report-Msgid-Bugs-To: \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"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: 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: 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: base_russian_localization
|
||||
#: model:ir.model,name:base_russian_localization.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
msgstr "Параметры конфигурации"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#. odoo-python
|
||||
#: 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: base_russian_localization
|
||||
#. odoo-python
|
||||
#: 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: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Contracts"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. 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: base_russian_localization
|
||||
#. odoo-python
|
||||
#: 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: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report act revise"
|
||||
msgstr "Отчет Акт сверки"
|
||||
|
||||
#. module: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Report contract"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. 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: base_russian_localization
|
||||
#. odoo-python
|
||||
#: 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: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "Russian Localization"
|
||||
msgstr "Российская локализация"
|
||||
|
||||
#. 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: base_russian_localization
|
||||
#: model_terms:ir.ui.view,arch_db:base_russian_localization.res_config_settings_view_form
|
||||
msgid "print_forms"
|
||||
msgstr "Печатные формы документов"
|
@ -1,30 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
module_act_revise = fields.Boolean(_("Act revise"))
|
||||
module_contract = fields.Boolean(_("Contract"))
|
||||
module_report_xml = fields.Boolean(_("Report_xml"))
|
||||
module_l10n_ru_doc = fields.Boolean(_("Print forms"))
|
||||
module_fehu_base_consent = fields.Boolean(_("Consent"))
|
||||
company_status_rf = fields.Boolean('', compute='_compute_company_status')
|
||||
|
||||
def _compute_company_status(self):
|
||||
company_state = False
|
||||
if self.env.company:
|
||||
company_state = self.env.company.state_id.code == 'RU'
|
||||
self.company_status_rf = company_state
|
||||
|
||||
@api.onchange('company_status_rf')
|
||||
def _onchange_company_status_rf(self):
|
||||
if self.company_status_rf:
|
||||
self.module_act_revise = False
|
||||
self.module_contract = False
|
||||
self.module_report_xml = False
|
||||
self.module_l10n_ru_doc = False
|
||||
self.module_fehu_base_consent = False
|
||||
|
@ -1,25 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': 'Контракты клиентов',
|
||||
'version': '17.0.2024.02.02',
|
||||
'sequence': 0,
|
||||
'author': 'StarlingSoft',
|
||||
'website': 'https://inf-centre.ru',
|
||||
'depends': [
|
||||
'base',
|
||||
'mail',
|
||||
'account', 'sale', 'sale_management', 'purchase'
|
||||
],
|
||||
'data': [
|
||||
'data/data.xml',
|
||||
'views/contract_customer_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'report/report_contract.xml',
|
||||
'report/report_contract_order.xml',
|
||||
'report/report_contract_order1.xml',
|
||||
'report/report_contract_invoce.xml',
|
||||
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import contract_customer, invoice_saleorder, dop_field, crutch_fields_header
|
@ -1,128 +0,0 @@
|
||||
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,2 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import report_contract,report_contract_order,report_contract_invoce
|
@ -1,93 +0,0 @@
|
||||
# fehy_base_consent
|
||||
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://gitlab.inf-centre.ru/mklab-base/l10n-russia/fehy_base_consent.git
|
||||
git branch -M v17-dev
|
||||
git push -uf origin v17-dev
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://gitlab.inf-centre.ru/mklab-base/l10n-russia/fehy_base_consent/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
@ -1,2 +0,0 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_fehu_base_consent,fehu.base.consent,model_fehu_base_consent,base.group_user,1,1,1,1
|
|
14
l10n_ru_act_rev/README.md
Normal file
14
l10n_ru_act_rev/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Российская локализация - Акт сверки
|
||||
name: l10n_ru_act_rev
|
||||
|
||||
|
||||
## Описание
|
||||
Добавление печатной формы акт сверки из контактов, с помощью которой можно легко отслеживать дебеторские и кредиторские проводки с клиентами.
|
||||
|
||||
### Для печати:
|
||||
1. Выбираем меню Контакты - карточку конкретного партнера - Действия - "Печать акт сверки";
|
||||
2. В визарде выбираем:
|
||||
2.1. Компанию (для которой нужна сверка с выбранным контактом);
|
||||
2.2. Период сверки;
|
||||
2.3. Цель (один из режимом: все проведенные проводки или все проводки, включая черновики);
|
||||
3. Кнопка "Печать"
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "act_revise",
|
||||
'name': "Российская локализация - Акт сверки",
|
||||
|
||||
'summary': """
|
||||
Добавление отчета акт сверки""",
|
||||
@ -18,14 +18,14 @@
|
||||
|
||||
""",
|
||||
|
||||
'author': "Odoo Community Association (OCA), MK Lab",
|
||||
'author': "MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
|
||||
'category': 'Uncategorized',
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": ["account", "portal", "website", "l10n_ru_doc", 'contract'],
|
||||
"depends": ["account", "portal", "website", 'contacts', "l10n_ru_doc", 'l10n_ru_contract', 'l10n_ru_base'],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"wizard/general_ledger_wizard_view.xml",
|
@ -1,6 +1,7 @@
|
||||
from odoo import http
|
||||
from odoo.http import request
|
||||
from datetime import datetime, date
|
||||
import werkzeug
|
||||
|
||||
|
||||
class ActRevise(http.Controller):
|
||||
@ -13,9 +14,13 @@ 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")
|
||||
# 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)
|
||||
|
||||
wizard_data = {
|
||||
"target_move": "posted",
|
||||
@ -28,10 +33,14 @@ class ActRevise(http.Controller):
|
||||
}
|
||||
wizard_record = request.env['general.ledger.act_revise.wizard'].sudo().create(wizard_data)
|
||||
|
||||
action = request.env.ref('act_revise.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')
|
||||
action_read = request.env.ref('l10n_ru_act_rev.action_general_ledger_wizard').sudo().read()
|
||||
if action_read:
|
||||
action = action_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):
|
||||
@ -84,6 +93,6 @@ class ActRevise(http.Controller):
|
||||
t = request.env['general.ledger.act_revise.wizard'].sudo().create(wizard_data)
|
||||
data = t._prepare_report_general_ledger()
|
||||
pdf, _ = request.env['ir.actions.report']._render_qweb_pdf(
|
||||
'act_revise.action_print_report_general_ledger_qweb', res_ids=t.id, data=data)
|
||||
'l10n_ru_act_rev.action_print_report_general_ledger_qweb', res_ids=t.id, data=data)
|
||||
pdfhttpheaders = [('Content-Type', 'application/pdf'), ('Content-Length', len(pdf)), ]
|
||||
return request.make_response(pdf, headers=pdfhttpheaders)
|
@ -5,9 +5,10 @@ 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.act_revise.general_ledger"
|
||||
_name = "report.l10n_ru_act_rev.general_ledger"
|
||||
_description = "General Ledger Report"
|
||||
|
||||
COMMON_ML_FIELDS = [
|
||||
@ -199,7 +200,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
|
||||
def _get_acc_prt_accounts_ids(self, company_id, grouped_by):
|
||||
accounts_domain = [
|
||||
("company_id", "=", company_id),
|
||||
("company_ids", "=", company_id),
|
||||
] + self._get_account_type_domain(grouped_by)
|
||||
acc_prt_accounts = self.env["account.account"].search(accounts_domain)
|
||||
return acc_prt_accounts.ids
|
||||
@ -208,7 +209,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
self, account_ids, company_id, date_from, base_domain, grouped_by, acc_prt=False
|
||||
):
|
||||
accounts_domain = [
|
||||
("company_id", "=", company_id),
|
||||
("company_ids", "=", company_id),
|
||||
("include_initial_balance", "=", True),
|
||||
]
|
||||
if account_ids:
|
||||
@ -226,7 +227,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
self, account_ids, company_id, date_from, fy_start_date, base_domain
|
||||
):
|
||||
accounts_domain = [
|
||||
("company_id", "=", company_id),
|
||||
("company_ids", "=", company_id),
|
||||
("include_initial_balance", "=", False),
|
||||
]
|
||||
if account_ids:
|
||||
@ -256,7 +257,7 @@ class GeneralLedgerReport(models.AbstractModel):
|
||||
self, account_ids, company_id, fy_start_date, base_domain
|
||||
):
|
||||
accounts_domain = [
|
||||
("company_id", "=", company_id),
|
||||
("company_ids", "=", company_id),
|
||||
("include_initial_balance", "=", False),
|
||||
]
|
||||
if account_ids:
|
||||
@ -930,7 +931,16 @@ 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"]
|
||||
@ -1004,6 +1014,11 @@ 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,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="act_revise.general_ledger">
|
||||
<t t-call="act_revise.html_container">
|
||||
<template id="l10n_ru_act_rev.general_ledger">
|
||||
<t t-call="l10n_ru_act_rev.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="act_revise.internal_layout">
|
||||
<t t-call="act_revise.report_general_ledger_base" />
|
||||
<t t-call="l10n_ru_act_rev.internal_layout">
|
||||
<t t-call="l10n_ru_act_rev.report_general_ledger_base" />
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
<template id="act_revise.report_general_ledger_base">
|
||||
<template id="l10n_ru_act_rev.report_general_ledger_base">
|
||||
<t t-set="foreign_currency" t-value="foreign_currency" />
|
||||
<t t-set="filter_partner_ids" t-value="filter_partner_ids" />
|
||||
<div class="page">
|
||||
@ -67,7 +67,7 @@
|
||||
<t t-foreach="general_ledger" t-as="account">
|
||||
<t t-if="'list_grouped' in account">
|
||||
<t t-foreach="account['list_grouped']" t-as="group_item">
|
||||
|
||||
|
||||
<t
|
||||
t-set="misc_domain"
|
||||
t-value="[('account_id', '=', account['id']),('date', '<', date_from)]"
|
||||
@ -95,7 +95,7 @@
|
||||
<t t-set="total_credit_init_all" t-value='total_credit_init_all+total_credit_init'/>
|
||||
</span>
|
||||
<t t-set="lines" t-value='lines+group_item["move_lines"]' />
|
||||
|
||||
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
@ -154,7 +154,7 @@
|
||||
<t
|
||||
t-set="misc_domain"
|
||||
t-value="[('account_id', '=', account['id']),('date', '<', date_from)]"
|
||||
/>
|
||||
/>
|
||||
<t
|
||||
t-set="misc_grouped_domain"
|
||||
t-value="[('partner_id', '=', group_item['id'])]"
|
||||
@ -259,8 +259,8 @@
|
||||
<field name="name">Акт сверки</field>
|
||||
<field name="model">general.ledger.act_revise.wizard</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">act_revise.general_ledger</field>
|
||||
<field name="report_file">act_revise.general_ledger</field>
|
||||
<field name="report_name">l10n_ru_act_rev.general_ledger</field>
|
||||
<field name="report_file">l10n_ru_act_rev.general_ledger</field>
|
||||
<field name="print_report_name">'Акт сверки - %s' % (object.get_report_filename() or '')</field>
|
||||
<field name="binding_model_id" ref="model_general_ledger_act_revise_wizard"/>
|
||||
</record>
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template id="act_revise.html_container">
|
||||
<template id="l10n_ru_act_rev.html_container">
|
||||
<t t-set="body_classname" t-value="'container'" />
|
||||
<t t-call="web.report_layout">
|
||||
<t t-out="0" />
|
||||
</t>
|
||||
</template>
|
||||
<template id="act_revise.internal_layout">
|
||||
<template id="l10n_ru_act_rev.internal_layout">
|
||||
<div class="article o_account_financial_reports_page">
|
||||
<t t-out="0" />
|
||||
</div>
|
@ -1,2 +1,3 @@
|
||||
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
|
|
@ -2,8 +2,8 @@
|
||||
<odoo>
|
||||
<template id="report_general_ledger">
|
||||
<div class="o_act_revise_page">
|
||||
<t t-call="act_revise.report_buttons" />
|
||||
<t t-call="act_revise.report_general_ledger_base" />
|
||||
<t t-call="l10n_ru_act_rev.report_buttons" />
|
||||
<t t-call="l10n_ru_act_rev.report_general_ledger_base" />
|
||||
</div>
|
||||
</template>
|
||||
</odoo>
|
@ -117,7 +117,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
)
|
||||
if self.company_id:
|
||||
self.account_ids = self.account_ids.filtered(
|
||||
lambda a: a.company_id == self.company_id
|
||||
lambda a: a.company_ids == 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_id", "=", self.company_id.id),
|
||||
("company_ids", "=", 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_id == self.company_id
|
||||
lambda a: a.company_ids == 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_id", "=", self.company_id.id)]
|
||||
res["domain"]["account_ids"] += [("company_ids", "=", self.company_id.id)]
|
||||
res["domain"]["account_journal_ids"] += [
|
||||
("company_id", "=", self.company_id.id)
|
||||
("company_ids", "=", 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_id", "=", self.company_id.id)]
|
||||
domain = [("company_ids", "=", 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_id", "=", record.company_id.id),
|
||||
("company_ids", "=", record.company_id.id),
|
||||
]
|
||||
)
|
||||
|
||||
@ -293,7 +293,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
|
||||
self.ensure_one()
|
||||
data = self._prepare_report_general_ledger()
|
||||
report = self.env["ir.actions.report"].search(
|
||||
[("report_name", "=", "act_revise.general_ledger"), ("report_type", "=", report_type)], limit=1, )
|
||||
[("report_name", "=", "l10n_ru_act_rev.general_ledger"), ("report_type", "=", report_type)], limit=1, )
|
||||
|
||||
if self.partner_ids[0].parent_id:
|
||||
partner = int(self.partner_ids[0].parent_id.id)
|
||||
@ -306,7 +306,6 @@ 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" />
|
||||
<field name="fy_start_date" invisible="1" /><!-- reason: need-->
|
||||
<field name="target_move" widget="radio" />
|
||||
</group>
|
||||
<group name="other_filters" invisible="1">
|
||||
<group name="other_filters" invisible="1"><!-- reason: need-->
|
||||
<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">
|
||||
<notebook invisible="1"><!-- reason: need-->
|
||||
<page string="Filter accounts">
|
||||
<group name="account_filter" col="4">
|
||||
<label for="account_ids" colspan="4" />
|
||||
@ -94,10 +94,7 @@
|
||||
</notebook>
|
||||
</div>
|
||||
<div invisible= "not_only_one_unaffected_earnings_account==False" >
|
||||
<field
|
||||
name="not_only_one_unaffected_earnings_account"
|
||||
invisible="1"
|
||||
/>
|
||||
<field name="not_only_one_unaffected_earnings_account" invisible="1"/><!-- reason: need-->
|
||||
<group />
|
||||
<h4>
|
||||
General Ledger can be computed only if selected company have
|
21
l10n_ru_attorney/README.md
Normal file
21
l10n_ru_attorney/README.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Российская локализация - Доверенность
|
||||
name: l10n_ru_attorney
|
||||
|
||||
## Описание
|
||||
Создание списка доверенностей на получение ТМЦ и их печать.
|
||||
|
||||
###Создание доверенности:
|
||||
1. Меню Покупки - Доверенности - кнопка "Создать";
|
||||
2. На форме указываем:
|
||||
|
||||
2.1. Контрагент - поставщик;
|
||||
|
||||
2.2. Заказ на закупку;
|
||||
|
||||
2.3. Даты действия доверенности ("дата выдачи" и "действительно по").
|
||||
|
||||
|
||||
###Для печати:
|
||||
1. Меню Настройки - Техническое - Отчеты;
|
||||
2. Находим в списке l10n_ru_attorney и добавляем в меню "Печать";
|
||||
3. Открываем созданную запись доверенности - Действие - "Доверенность".
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "fehu_base_consent",
|
||||
'name': "Российская локализация - Доверенность",
|
||||
|
||||
'summary': """
|
||||
Печать доверенности на получение ТМЦ
|
||||
@ -18,23 +18,23 @@
|
||||
|
||||
Для печати:
|
||||
1. Меню Настройки - Техническое - Отчеты;
|
||||
2. Находим в списке fehu_base_consent и добавляем в меню "Печать";
|
||||
2. Находим в списке l10n_ru_attorney и добавляем в меню "Печать";
|
||||
3. Открываем созданную запись доверенности - Действие - "Доверенность".
|
||||
""",
|
||||
|
||||
'author': "Odoo Community Association (OCA), MK Lab",
|
||||
'author': "MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
|
||||
'category': 'Uncategorized',
|
||||
'version': '0.1',
|
||||
|
||||
# any module necessary for this one to work correctly
|
||||
'depends': ['base','account','sale', 'purchase','hr',],
|
||||
'depends': ['base', 'account', 'sale', 'purchase', 'hr', 'l10n_ru_base'],
|
||||
|
||||
# always loaded
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/fehy_base_consent_views.xml',
|
||||
'views/base_consent_views.xml',
|
||||
'views/hr_employee_views.xml',
|
||||
'views/purchase_order_views.xml',
|
||||
'report/consent_report.xml',
|
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import fehu_base_consent
|
||||
from . import base_consent
|
||||
from . import hr_employee
|
||||
from . import purchase_order
|
BIN
l10n_ru_attorney/models/__init__.pyc
Normal file
BIN
l10n_ru_attorney/models/__init__.pyc
Normal file
Binary file not shown.
@ -4,8 +4,8 @@ from odoo import api, fields, models, _
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
|
||||
class FehuBaseConsent(models.Model):
|
||||
_name = 'fehu.base.consent'
|
||||
class BaseConsent(models.Model):
|
||||
_name = 'base.consent'
|
||||
_inherit = ['mail.thread', 'utm.mixin']
|
||||
_description = 'Consent'
|
||||
_order = 'date_from desc'
|
||||
@ -18,12 +18,12 @@ class FehuBaseConsent(models.Model):
|
||||
purchaseorder_id = fields.Many2one('purchase.order', _('Заказ на закупку'), domain="[('partner_id','=',partner_id)]",
|
||||
required=1)
|
||||
company_id = fields.Many2one('res.company', string=_('Компания'),
|
||||
default=lambda self: self.env['res.company']._company_default_get('fehu.consent'),
|
||||
default=lambda self: self.env['res.company']._company_default_get('base.consent'),
|
||||
required=1)
|
||||
|
||||
@api.model
|
||||
def create(self, val):
|
||||
name = self.env['ir.sequence'].next_by_code('fehu.base.consent')
|
||||
name = self.env['ir.sequence'].next_by_code('base.consent')
|
||||
if name:
|
||||
if 'name' in val:
|
||||
if val['name'] == False:
|
||||
@ -31,7 +31,7 @@ class FehuBaseConsent(models.Model):
|
||||
'name': name,
|
||||
})
|
||||
|
||||
result = super(FehuBaseConsent, self).create(val)
|
||||
result = super(BaseConsent, self).create(val)
|
||||
return result
|
||||
|
||||
@api.onchange('purchaseorder_id')
|
@ -9,3 +9,11 @@ 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)
|
||||
|
@ -6,4 +6,4 @@ from odoo import fields, models, _
|
||||
class PurchaseOrder(models.Model):
|
||||
_inherit = 'purchase.order'
|
||||
|
||||
consent_id = fields.Many2one('fehu.base.consent', string=_('Доверенность'))
|
||||
consent_id = fields.Many2one('base.consent', string=_('Доверенность'))
|
@ -4,18 +4,18 @@
|
||||
<report
|
||||
string="Доверенность"
|
||||
id="action_report_consent"
|
||||
model="fehu.base.consent"
|
||||
model="base.consent"
|
||||
report_type="qweb-pdf"
|
||||
name="fehu_base_consent.report_consent"
|
||||
file="fehu_base_consent.report_consent"
|
||||
name="l10n_ru_attorney.report_consent"
|
||||
file="l10n_ru_attorney.report_consent"
|
||||
/>
|
||||
|
||||
<record model="ir.actions.report" id="fehu_base_consent.action_report_consent">
|
||||
<record model="ir.actions.report" id="l10n_ru_attorney.action_report_consent">
|
||||
<field name="name">Доверенность</field>
|
||||
<field name="model">fehu.base.consent</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_name">fehu_base_consent.report_consent</field>
|
||||
<field name="report_name">l10n_ru_attorney.report_consent</field>
|
||||
</record>
|
||||
|
||||
<record id="paperformat_a4new" model="report.paperformat">
|
||||
@ -34,276 +34,103 @@
|
||||
<field name="dpi">90</field>
|
||||
</record>
|
||||
|
||||
<template id="fehu_base_consent.report_consent">
|
||||
<t t-call="web.html_container">
|
||||
<template id="l10n_ru_attorney.report_consent">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div class="page">
|
||||
<style type="text/css">
|
||||
/*----------------Invoice classes-------------------*/
|
||||
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 .box1 table,
|
||||
.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 .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;
|
||||
}
|
||||
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%;}
|
||||
|
||||
/*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 .box1 table,
|
||||
.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 .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>
|
||||
|
||||
<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>
|
||||
@ -314,63 +141,45 @@
|
||||
</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>
|
||||
|
||||
|
||||
@ -378,16 +187,10 @@
|
||||
</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>
|
||||
@ -395,56 +198,32 @@
|
||||
<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>
|
||||
@ -452,15 +231,9 @@
|
||||
|
||||
<div>
|
||||
<h4 style="text-align:center; margin:15px 5px 15px;">
|
||||
|
||||
|
||||
Перечень материальных ценностей,
|
||||
|
||||
|
||||
<br/>
|
||||
подлежащих получению
|
||||
|
||||
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
@ -494,60 +267,30 @@
|
||||
<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>
|
2
l10n_ru_attorney/security/ir.model.access.csv
Normal file
2
l10n_ru_attorney/security/ir.model.access.csv
Normal file
@ -0,0 +1,2 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_base_consent,base.consent,model_base_consent,base.group_user,1,1,1,1
|
|
@ -1,23 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="fehu.base.consent.tree" model="ir.ui.view">
|
||||
<record id="base_consent_tree" model="ir.ui.view">
|
||||
<field name="name">Consents</field>
|
||||
<field name="model">fehu_base_consent</field>
|
||||
<field name="model">base.consent</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="employee_id"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fehu.base.consent.form" model="ir.ui.view">
|
||||
<record id="base_consent_form" model="ir.ui.view">
|
||||
<field name="name">consent.form</field>
|
||||
<field name="model">fehu.base.consent</field>
|
||||
<field name="model">base.consent</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header></header>
|
||||
@ -36,26 +36,27 @@
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
<chatter/>
|
||||
<!-- <div class="oe_chatter">-->
|
||||
<!-- <field name="message_follower_ids" widget="mail_followers"/>-->
|
||||
<!-- <field name="message_ids" widget="mail_thread"/>-->
|
||||
<!-- </div>-->
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fehu_base_consent.action_consent" model="ir.actions.act_window">
|
||||
<record id="l10n_ru_attorney.action_consent" model="ir.actions.act_window">
|
||||
<field name="name">Доверенности</field>
|
||||
<field name="res_model">fehu.base.consent</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="res_model">base.consent</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="fehu_base_consent.menu_1" name="Consents" parent="purchase.menu_purchase_root"
|
||||
action="fehu_base_consent.action_consent"/>
|
||||
<menuitem id="l10n_ru_attorney.menu_1" name="Доверенности" parent="purchase.menu_purchase_root"
|
||||
action="l10n_ru_attorney.action_consent"/>
|
||||
|
||||
<record id="seq_consent" model="ir.sequence">
|
||||
<field name="name">Consents</field>
|
||||
<field name="code">fehu.consent</field>
|
||||
<field name="code">base.consent</field>
|
||||
<field name="prefix">CON</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
16
l10n_ru_base/README.md
Normal file
16
l10n_ru_base/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Российская локализация - Базовый
|
||||
name: l10n_ru_base
|
||||
|
||||
## Описание
|
||||
Российская локализация: основные отчеты и печатные формы. Это базовый модуль для работы с модулями локализации.
|
||||
|
||||
###Для включения модулей:
|
||||
1. Меню Настройки - в боковом меню "Российская локализация";
|
||||
2. Выбирается нужный блок для подключения дополнительных возможностей по локализации.
|
||||
|
||||
###Перечень модулей локализации:
|
||||
1. Российская локализация - Акт сверки (l10n_ru_act_rev)
|
||||
2. Российская локализация - Доверенность (l10n_ru_attorney)
|
||||
3. Российская локализация - Договоры (l10n_ru_contract)
|
||||
4. Российская локализация - Документы (l10n_ru_doc)
|
||||
5. Российская локализация - УПД в xml-формате (l10n_ru_upd_xml)
|
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': "base_russian_localization",
|
||||
'name': "Российская локализация - Базовый>",
|
||||
'summary': """
|
||||
Российская локализация: основные отчеты и печатные формы.
|
||||
""",
|
||||
@ -13,14 +13,14 @@
|
||||
2. Выбирается нужный блок.
|
||||
""",
|
||||
|
||||
'author': "Odoo Community Association (OCA), MK Lab",
|
||||
'author': "MK.Lab",
|
||||
'website': "https://www.inf-centre.ru/",
|
||||
|
||||
'version': '17.0.1.0.0',
|
||||
'version': '18.0.1.0.0',
|
||||
'license': 'LGPL-3',
|
||||
'category': 'Uncategorized',
|
||||
|
||||
'depends': [],
|
||||
'depends': ["account", "portal", "website", 'contacts','base', 'mail', 'sale', 'purchase', 'hr','sale_management', 'sale_stock', 'uom','web'],
|
||||
|
||||
'data': [
|
||||
'views/res_config_settings_views.xml',
|
117
l10n_ru_base/i18n/ru_RU.po
Normal file
117
l10n_ru_base/i18n/ru_RU.po
Normal file
@ -0,0 +1,117 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_ru_base
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.0+e\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"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. 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_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
|
||||
#, 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
|
||||
msgid "Company Status Rf"
|
||||
msgstr "Статус компании"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model:ir.model,name:l10n_ru_base.model_res_config_settings
|
||||
msgid "Config Settings"
|
||||
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_fehu_base_consent
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
#, python-format
|
||||
msgid "Consent"
|
||||
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_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
|
||||
msgid "Contracts"
|
||||
msgstr "Договоры"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.res_config_settings_view_form
|
||||
msgid "Powers of attorney"
|
||||
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_l10n_ru_doc
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.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
|
||||
msgid "Report act revise"
|
||||
msgstr "Отчет Акт сверки"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.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
|
||||
msgid "Report report_xml"
|
||||
msgstr "УПД в формате xml для ЭДО"
|
||||
|
||||
#. 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_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
|
||||
msgid "Russian Localization"
|
||||
msgstr "Российская локализация"
|
||||
|
||||
#. module: l10n_ru_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_ru_base.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
|
||||
msgid "print_forms"
|
||||
msgstr "Печатные формы документов"
|
46
l10n_ru_base/models/res_config_settings.py
Normal file
46
l10n_ru_base/models/res_config_settings.py
Normal file
@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
import logging
|
||||
|
||||
_FIELDS_MODUL = [
|
||||
'module_l10n_ru_act_rev',
|
||||
'module_l10n_ru_contract',
|
||||
'module_l10n_ru_upd_xml',
|
||||
'module_l10n_ru_doc',
|
||||
'module_l10n_ru_attorney'
|
||||
]
|
||||
|
||||
class ResConfigSettings(models.TransientModel):
|
||||
_inherit = 'res.config.settings'
|
||||
|
||||
module_l10n_ru_act_rev = fields.Boolean(_("Act revise"))
|
||||
module_l10n_ru_contract = fields.Boolean(_("Contract"))
|
||||
module_l10n_ru_upd_xml = fields.Boolean(_("Report_xml"))
|
||||
module_l10n_ru_doc = fields.Boolean(_("Print forms"))
|
||||
module_l10n_ru_attorney = fields.Boolean(_("Consent"))
|
||||
|
||||
@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]:
|
||||
module_name = field[7:]
|
||||
module_installed = self.env['ir.module.module'].search([('name', '=', module_name)], limit=1)
|
||||
if not module_installed:
|
||||
missing_modules.add(module_name)
|
||||
if missing_modules:
|
||||
message = "Обратитесь в тех.поддержку для получения лицензии для следующих модулей:\n" + \
|
||||
"\n".join(missing_modules)
|
||||
raise UserError(message)
|
||||
return super(ResConfigSettings, self).write(values)
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -8,17 +8,22 @@
|
||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form" position="inside">
|
||||
<app data-string="Russian Localization" string="Russian Localization" name="base_russian_localization" img="">
|
||||
<app data-string="Russian Localization" string="Russian Localization" name="base_russian_localization" img="l10n_ru_base/static/description/icon.png">
|
||||
<block title="Act revise" name="act_revise_setting_container">
|
||||
<setting id="act_revise" string="Act revise" help="Report act revise"><field name="module_act_revise"/></setting>
|
||||
<setting id="act_revise" string="Act revise" help="Report act revise">
|
||||
<field name="module_l10n_ru_act_rev"/>
|
||||
</setting>
|
||||
</block>
|
||||
<block title="Contracts" name="contract_setting_container">
|
||||
<setting id="contract" string="Contracts" help="Report contract"><field name="module_contract"/></setting>
|
||||
<setting id="contract" string="Contracts" help="Report contract">
|
||||
<field name="module_l10n_ru_contract"/>
|
||||
</setting>
|
||||
</block>
|
||||
<block title="UPD xml" name="upd_xml_setting_container">
|
||||
<setting id="report_xml" string="UPD xml" help="Report report_xml"><field name="module_report_xml"/></setting>
|
||||
<setting id="report_xml" string="UPD xml" help="Report report_xml">
|
||||
<field name="module_l10n_ru_upd_xml"/>
|
||||
</setting>
|
||||
</block>
|
||||
|
||||
<block title="Print forms" name="print_forms_setting_container">
|
||||
<setting id="print_forms" string="Print forms" help="print_forms">
|
||||
<field name="module_l10n_ru_doc"/>
|
||||
@ -26,7 +31,7 @@
|
||||
</block>
|
||||
<block title="Consent" name="powers_attorney_setting_container">
|
||||
<setting id="powers_attorney" string="Consent" help="Powers of attorney">
|
||||
<field name="module_fehu_base_consent"/>
|
||||
<field name="module_l10n_ru_attorney"/>
|
||||
</setting>
|
||||
</block>
|
||||
</app>
|
30
l10n_ru_contract/README.md
Normal file
30
l10n_ru_contract/README.md
Normal file
@ -0,0 +1,30 @@
|
||||
# Российская локализация - Договоры
|
||||
name: l10n_ru_contract
|
||||
|
||||
|
||||
## Описание
|
||||
Создание договоров с клиентами и поставщиками в системе.
|
||||
Возможность разделения договоров на виды, отслеживание статуса договора. Вы также можете распечатать договор из системы.
|
||||
|
||||
### Создание вида договора клиента(поставщика):
|
||||
1. Меню Продажи (Покупки) - Договоры - Виды договора - кнопка "Создать";
|
||||
2. На форме указываем:
|
||||
|
||||
2.1. Журнал и счета дебетовой и кредиторской задолженности;
|
||||
|
||||
2.2. Присваиваем новое название.
|
||||
|
||||
### Создание договора клиента (поставщика):
|
||||
1. Меню Продажи (Покупки) - Договоры - кнопка "Создать";
|
||||
2. На форме указываем основные и дополнительные условия договора:
|
||||
|
||||
2.1. Контрагент - клиент (поставщик);
|
||||
|
||||
2.2. Тип контрагента;
|
||||
|
||||
2.3. Компанию, от лица которой будет подписан договор;
|
||||
|
||||
2.4. Вид договора.
|
||||
|
||||
### Для печати:
|
||||
1. Открываем созданную запись договора - Действие - "Договор".
|
52
l10n_ru_contract/__manifest__.py
Normal file
52
l10n_ru_contract/__manifest__.py
Normal file
@ -0,0 +1,52 @@
|
||||
# -*- 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',
|
||||
'sequence': 0,
|
||||
'author': 'MK.Lab',
|
||||
'website': 'https://www.inf-centre.ru/',
|
||||
'external_dependencies': {
|
||||
'python': ['pymorphy2'],
|
||||
},
|
||||
'depends': [
|
||||
'base',
|
||||
'mail',
|
||||
'account', 'sale', 'sale_management', 'purchase', 'l10n_ru_base'
|
||||
],
|
||||
'data': [
|
||||
'data/data.xml',
|
||||
'views/contract_customer_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'report/report_contract.xml',
|
||||
'report/report_contract_order.xml',
|
||||
'report/report_contract_order1.xml',
|
||||
'report/report_contract_invoice.xml',
|
||||
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
9
l10n_ru_contract/models/__init__.py
Normal file
9
l10n_ru_contract/models/__init__.py
Normal file
@ -0,0 +1,9 @@
|
||||
# -*- 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
|
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-35.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-35.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-37.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-37.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/__init__.cpython-39.pyc
Normal file
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.
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-310.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-311.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-311.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-36.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-36.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-37.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-37.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-38.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-38.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-39.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/dop_field.cpython-39.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/models/__pycache__/report_helper.cpython-36.pyc
Normal file
BIN
l10n_ru_contract/models/__pycache__/report_helper.cpython-36.pyc
Normal file
Binary file not shown.
50
l10n_ru_contract/models/account_move.py
Normal file
50
l10n_ru_contract/models/account_move.py
Normal file
@ -0,0 +1,50 @@
|
||||
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, order):
|
||||
def _expand_states(self, states, domain):
|
||||
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(_('День'))
|
13
l10n_ru_contract/models/purchase_order.py
Normal file
13
l10n_ru_contract/models/purchase_order.py
Normal file
@ -0,0 +1,13 @@
|
||||
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
|
18
l10n_ru_contract/models/sale_make_invoice_advance.py
Normal file
18
l10n_ru_contract/models/sale_make_invoice_advance.py
Normal file
@ -0,0 +1,18 @@
|
||||
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
|
62
l10n_ru_contract/models/sale_order.py
Normal file
62
l10n_ru_contract/models/sale_order.py
Normal file
@ -0,0 +1,62 @@
|
||||
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
|
4
l10n_ru_contract/report/__init__.py
Normal file
4
l10n_ru_contract/report/__init__.py
Normal file
@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import report_contract
|
||||
from . import report_contract_order
|
||||
from . import report_contract_invoice
|
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-35.pyc
Normal file
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-35.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-36.pyc
Normal file
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-36.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-37.pyc
Normal file
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-37.pyc
Normal file
Binary file not shown.
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-38.pyc
Normal file
BIN
l10n_ru_contract/report/__pycache__/__init__.cpython-38.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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