Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
8bb98698
Commit
8bb98698
authored
7 years ago
by
Luis Torres
Committed by
qdp-odoo
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] l10n_mx: set cash basis configuration in taxes.
Courtesy of Vauxoo. Was PR #17055
parent
c3c98e93
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/l10n_mx/data/account_tax_data.xml
+16
-0
16 additions, 0 deletions
addons/l10n_mx/data/account_tax_data.xml
addons/l10n_mx/models/chart_template.py
+0
-38
0 additions, 38 deletions
addons/l10n_mx/models/chart_template.py
with
16 additions
and
38 deletions
addons/l10n_mx/data/account_tax_data.xml
+
16
−
0
View file @
8bb98698
...
...
@@ -26,6 +26,8 @@
<field
name=
"refund_account_id"
ref=
"cuenta209_01"
/>
<field
name=
"tag_ids"
eval=
"[(6,0,[ref('tag_iva')])]"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta208_01"
/>
</record>
<record
id=
"tax12"
model=
"account.tax.template"
>
...
...
@@ -39,6 +41,8 @@
<field
name=
"refund_account_id"
ref=
"cuenta209_01"
/>
<field
name=
"tag_ids"
eval=
"[(6,0,[ref('tag_iva')])]"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta208_01"
/>
</record>
<record
id=
"tax1"
model=
"account.tax.template"
>
...
...
@@ -51,6 +55,8 @@
<field
name=
"account_id"
ref=
"cuenta216_10"
/>
<field
name=
"refund_account_id"
ref=
"cuenta216_10"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva_ret"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta216_10_20"
/>
</record>
<record
id=
"tax2"
model=
"account.tax.template"
>
...
...
@@ -63,6 +69,8 @@
<field
name=
"account_id"
ref=
"cuenta216_10"
/>
<field
name=
"refund_account_id"
ref=
"cuenta216_10"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva_ret"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta216_10_20"
/>
</record>
<record
id=
"tax3"
model=
"account.tax.template"
>
...
...
@@ -99,6 +107,8 @@
<field
name=
"account_id"
ref=
"cuenta216_10"
/>
<field
name=
"refund_account_id"
ref=
"cuenta216_10"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva_ret"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta216_10_20"
/>
</record>
<record
id=
"tax8"
model=
"account.tax.template"
>
...
...
@@ -111,6 +121,8 @@
<field
name=
"account_id"
ref=
"cuenta216_10"
/>
<field
name=
"refund_account_id"
ref=
"cuenta216_10"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva_ret"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta216_10_20"
/>
</record>
<record
id=
"tax13"
model=
"account.tax.template"
>
...
...
@@ -123,6 +135,8 @@
<field
name=
"account_id"
ref=
"cuenta119_01"
/>
<field
name=
"refund_account_id"
ref=
"cuenta119_01"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta118_01"
/>
</record>
<record
id=
"tax14"
model=
"account.tax.template"
>
...
...
@@ -135,6 +149,8 @@
<field
name=
"account_id"
ref=
"cuenta119_01"
/>
<field
name=
"refund_account_id"
ref=
"cuenta119_01"
/>
<field
name=
"tax_group_id"
ref=
"tax_group_iva"
/>
<field
name=
"use_cash_basis"
eval=
"True"
/>
<field
name=
"cash_basis_account"
ref=
"cuenta118_01"
/>
</record>
</data>
</odoo>
This diff is collapsed.
Click to expand it.
addons/l10n_mx/models/chart_template.py
+
0
−
38
View file @
8bb98698
...
...
@@ -8,44 +8,6 @@ from odoo import models, api, _
class
AccountChartTemplate
(
models
.
Model
):
_inherit
=
"
account.chart.template
"
@api.multi
def
_load_template
(
self
,
company
,
code_digits
=
None
,
transfer_account_id
=
None
,
account_ref
=
None
,
taxes_ref
=
None
):
"""
Set the
'
use_cash_basis
'
and
'
cash_basis_account
'
fields on account.account. This hack is needed due to the fact
that the tax template does not have the fields
'
use_cash_basis
'
and
'
cash_basis_account
'
.
This hunk should be removed in master, as the account_tax_cash_basis module has been merged already in account
module
"""
self
.
ensure_one
()
accounts
,
taxes
=
super
(
AccountChartTemplate
,
self
).
_load_template
(
company
,
code_digits
=
code_digits
,
transfer_account_id
=
transfer_account_id
,
account_ref
=
account_ref
,
taxes_ref
=
taxes_ref
)
if
not
self
==
self
.
env
.
ref
(
'
l10n_mx.mx_coa
'
):
return
accounts
,
taxes
account_tax_obj
=
self
.
env
[
'
account.tax
'
]
account_obj
=
self
.
env
[
'
account.account
'
]
taxes_acc
=
{
'
IVA
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
208.01.01
'
)]),
'
ITAXR_04-OUT
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
216.10.20
'
)]),
'
ITAXR_10-OUT
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
216.10.20
'
)]),
'
ITAX_1067-OUT
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
216.10.20
'
)]),
'
ITAX_167-OUT
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
216.10.20
'
)]),
'
ITAX_010-OUT
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
208.01.01
'
)]),
'
ITAX_160-OUT
'
:
account_obj
.
search
([(
'
code
'
,
'
=
'
,
'
208.01.01
'
)])}
for
tax
in
self
.
tax_template_ids
:
if
tax
.
description
not
in
taxes_acc
:
continue
account_tax_obj
.
browse
(
taxes
.
get
(
tax
.
id
)).
write
({
'
use_cash_basis
'
:
True
,
'
cash_basis_account
'
:
taxes_acc
.
get
(
tax
.
description
).
id
,
})
return
accounts
,
taxes
@api.model
def
generate_journals
(
self
,
acc_template_ref
,
company
,
journals_dict
=
None
):
"""
Set the tax_cash_basis_journal_id on the company
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment