-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '11.0' into fix/inutilizacao-multi-empresa
- Loading branch information
Showing
11 changed files
with
129 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from odoo import fields, models | ||
|
||
|
||
class ResCompany(models.Model): | ||
_inherit = "res.company" | ||
|
||
l10n_br_pymt_fine_account_id = fields.Many2one( | ||
'account.account', | ||
string="Conta para pagamento de multa", | ||
domain=[('user_type_id.type', '=', 'payable')]) | ||
|
||
l10n_br_pymt_interest_account_id = fields.Many2one( | ||
'account.account', | ||
string="Conta para pagamento de juros", | ||
domain=[('user_type_id.type', '=', 'payable')]) | ||
|
||
l10n_br_interest_account_id = fields.Many2one( | ||
'account.account', | ||
string="Conta para recebimento de juros", | ||
domain=[('user_type_id', '=', 'receivable')]) | ||
|
||
l10n_br_fine_account_id = fields.Many2one( | ||
'account.account', | ||
string="Conta para recebimento de multa", | ||
domain=[('user_type_id.type', '=', 'receivable')]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# © 2018 Trustcode | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import models, fields | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = 'res.config.settings' | ||
|
||
l10n_br_pymt_interest_account_id = fields.Many2one( | ||
'account.account', | ||
related='company_id.l10n_br_pymt_interest_account_id', | ||
string="Conta para pagamento de juros", | ||
domain="[('company_id', '=', company_id),\ | ||
('user_type_id.type', '=', 'payable')]", | ||
help='Conta onde será debitado o montante dos juros pagos' | ||
) | ||
|
||
l10n_br_pymt_fine_account_id = fields.Many2one( | ||
'account.account', | ||
related='company_id.l10n_br_pymt_fine_account_id', | ||
string="Conta para pagamento de multa", | ||
help='Conta onde será debitado o montante das multas pagas' | ||
) | ||
|
||
l10n_br_interest_account_id = fields.Many2one( | ||
'account.account', | ||
related='company_id.l10n_br_interest_account_id', | ||
string="Conta para recebimento de juros", | ||
help='Conta onde será creditado o montante dos juros recebidos' | ||
) | ||
|
||
l10n_br_fine_account_id = fields.Many2one( | ||
'account.account', | ||
related='company_id.l10n_br_fine_account_id', | ||
string="Conta para recebimento de multa", | ||
help='Conta onde será creditado o montante das multas recebidas' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo> | ||
<record id="res_config_settings_account_payment" model="ir.ui.view"> | ||
<field name="name">res_config_settings.account.payment</field> | ||
<field name="model">res.config.settings</field> | ||
<field name="inherit_id" ref="account.res_config_settings_view_form"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='module_account_batch_deposit']/parent::div/parent::div" position="after"> | ||
<div class="col-xs-12 col-md-6 o_setting_box" title="Define accounts to use for fine and interest."> | ||
<div class="o_setting_right_pane"> | ||
<label string="Fines and Interests Accounts"/> | ||
<div class="text-muted"> | ||
Select account to pay interests and fines values | ||
</div> | ||
<div class="content-group"> | ||
<div class="row mt16"> | ||
<label string="Interest Account" for="l10n_br_interest_account_id" class="col-md-3 o_light_label"/> | ||
<field name="l10n_br_interest_account_id" domain="[('company_id', '=', company_id), ('user_type_id.type', '=', 'receivable')]"/> | ||
</div> | ||
<div class="row"> | ||
<label string="Fines Account" for="l10n_br_fine_account_id" class="col-md-3 o_light_label"/> | ||
<field name="l10n_br_fine_account_id" domain="[('company_id', '=', company_id), ('user_type_id.type', '=', 'receivable')]"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</xpath> | ||
<xpath expr="//field[@name='module_account_sepa']/parent::div/parent::div" position="after"> | ||
<div class="col-xs-12 col-md-6 o_setting_box" title="Define accounts to use for fine and interest."> | ||
<div class="o_setting_right_pane"> | ||
<label string="Fines and Interests Accounts"/> | ||
<div class="text-muted"> | ||
Select account to receive interests and fines values | ||
</div> | ||
<div class="content-group"> | ||
<div class="row mt16"> | ||
<label string="Interest Account" for="l10n_br_pymt_interest_account_id" class="col-md-3 o_light_label"/> | ||
<field name="l10n_br_pymt_interest_account_id" domain="[('company_id', '=', company_id), ('user_type_id.type', '=', 'payable')]"/> | ||
</div> | ||
<div class="row"> | ||
<label string="Fines Account" for="l10n_br_pymt_fine_account_id" class="col-md-3 o_light_label"/> | ||
<field name="l10n_br_pymt_fine_account_id" domain="[('company_id', '=', company_id), ('user_type_id.type', '=', 'payable')]"/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters