Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '10.0' into 10.0-correcoes_cnab_bradesco
- Loading branch information
Showing
15 changed files
with
469 additions
and
12 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,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2018 Trustcode | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import models, fields, api | ||
|
||
|
||
class AccountInvoiceRefund(models.TransientModel): | ||
_inherit = 'account.invoice.refund' | ||
|
||
fiscal_position_id = fields.Many2one( | ||
'account.fiscal.position', string="Posição Fiscal") | ||
|
||
@api.multi | ||
def invoice_refund(self): | ||
res = super(AccountInvoiceRefund, self).invoice_refund() | ||
|
||
invoice_id = res['domain'][1][2][0] | ||
invoice_id = self.env['account.invoice'].search([ | ||
('id', '=', invoice_id) | ||
]) | ||
|
||
invoice_id.write({'fiscal_position_id': self.fiscal_position_id.id}) | ||
|
||
if self.fiscal_position_id: | ||
for item in invoice_id.invoice_line_ids: | ||
price_unit = item.price_unit | ||
item._onchange_product_id() | ||
item._br_account_onchange_product_id() | ||
item.write({'price_unit': price_unit}) | ||
item._set_extimated_taxes(price_unit) | ||
|
||
return res |
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="br_account_refund_view" model="ir.ui.view"> | ||
<field name="name">br_account.refund.view</field> | ||
<field name="model">account.invoice.refund</field> | ||
<field name="inherit_id" ref="account.view_account_invoice_refund"/> | ||
<field name="arch" type="xml"> | ||
<field name="description" position="after"> | ||
<field name="fiscal_position_id" /> | ||
</field> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
|
||
from . import models | ||
from . import tests | ||
from . import wizard |
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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2017 Danimar Ribeiro, Trustcode | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from . import wizard_import_cnab |
Oops, something went wrong.