-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE] forward port branch 9.0 up to eaf5465
- Loading branch information
Showing
11 changed files
with
91 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
import account_tax | ||
import account_partial_reconcile |
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,18 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
{ | ||
'name' : 'Tax Cash Basis Edit Base Account', | ||
'version' : '1.0', | ||
'summary': 'Add a custom account to handle base amount lines', | ||
'sequence': 5, | ||
'description': """ | ||
Move the cash basis lines to another account. | ||
""", | ||
'category': 'Accounting', | ||
'depends': ['account_tax_cash_basis'], | ||
'data': [ | ||
'views/account_tax_views.xml', | ||
], | ||
'installable': True, | ||
'auto_install': True, | ||
} |
13 changes: 13 additions & 0 deletions
13
addons/account_cash_basis_base_account/account_partial_reconcile.py
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 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
from openerp import api, models | ||
|
||
|
||
class AccountPartialReconcileCashBasis(models.Model): | ||
_inherit = 'account.partial.reconcile' | ||
|
||
def _get_tax_cash_basis_base_account(self, line, tax): | ||
if tax.cash_basis_base_account_id: | ||
return tax.cash_basis_base_account_id | ||
return super(AccountPartialReconcileCashBasis, self)._get_tax_cash_basis_base_account(line, tax) |
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,11 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from openerp import api, fields, models | ||
|
||
|
||
class AccountTax(models.Model): | ||
_inherit = 'account.tax' | ||
|
||
cash_basis_base_account_id = fields.Many2one('account.account', domain=[('deprecated', '=', False)], | ||
string='Base Tax Received Account', | ||
help='Account that will be set on lines created in cash basis journal entry and used to keep track of the tax base amount.') |
15 changes: 15 additions & 0 deletions
15
addons/account_cash_basis_base_account/views/account_tax_views.xml
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,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
<record id="view_tax_form_cash_basis_inherit" model="ir.ui.view"> | ||
<field name="name">tax.form.cash.basis.base.account.inherit</field> | ||
<field name="model">account.tax</field> | ||
<field name="inherit_id" ref="account_tax_cash_basis.view_tax_form_cash_basis_inherit"/> | ||
<field name="arch" type="xml"> | ||
<xpath expr="//field[@name='cash_basis_account']" position="after"> | ||
<field name="cash_basis_base_account_id" attrs="{'invisible': [('use_cash_basis', '=', False)]}"/> | ||
</xpath> | ||
</field> | ||
</record> | ||
</data> | ||
</openerp> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
France, 2018-04-04, | ||
|
||
I hereby agree to the terms of the Odoo Individual Contributor License | ||
Agreement v1.0. | ||
|
||
I declare that I am authorized and able to make this agreement and sign this | ||
declaration. | ||
|
||
Signed, | ||
|
||
Thomas Lemaire thomas.lemaire@ndp-systemes.fr https://github.com/thomas-tankengine |