Merge lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa into lp:openobject-addons
- trunk-new-account-tax-design-tpa
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa |
Merge into: | lp:openobject-addons |
Diff against target: |
9832 lines (+6270/-2228) 44 files modified
account/__openerp__.py (+1/-0) account/account.py (+350/-298) account/account_invoice.py (+52/-53) account/account_move_line.py (+11/-21) account/account_view.xml (+150/-118) account/data/configurable_account_chart.xml (+309/-55) account/product.py (+1/-1) account/security/ir.model.access.csv (+4/-0) account/test/account_customer_invoice.yml (+5/-0) account/test/account_supplier_invoice.yml (+12/-1) account/test/account_tax_cal.yml (+247/-0) account/test/account_validate_account_move.yml (+2/-3) account/test/test_edi_invoice.yml (+6/-1) account/tests/test_tax.py (+8/-7) account/wizard/account_change_currency.py (+2/-0) account_voucher/account_voucher.py (+10/-6) account_voucher/test/case1_usd_usd.yml (+2/-0) account_voucher/test/case2_usd_eur_debtor_in_eur.yml (+2/-0) account_voucher/test/case2_usd_eur_debtor_in_usd.yml (+2/-0) account_voucher/test/case3_eur_eur.yml (+2/-0) account_voucher/test/case4_cad_chf.yml (+1/-0) account_voucher/test/case5_suppl_usd_usd.yml (+1/-0) account_voucher/test/case_eur_usd.yml (+1/-0) account_voucher/test/sales_payment.yml (+1/-0) account_voucher/voucher_sales_purchase_view.xml (+8/-12) hr_expense/hr_expense.py (+9/-7) hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml (+6/-1) hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml (+6/-2) l10n_br/account.py (+2/-7) l10n_br/account_view.xml (+0/-6) l10n_br/data/account_tax_template.xml (+3882/-1332) l10n_cn/account_chart.xml (+71/-6) l10n_gr/account_tax_vat.xml (+340/-54) l10n_ma/l10n_ma_tax.xml (+1/-1) l10n_mx/data/account_tax.xml (+553/-168) l10n_tr/account_tax_template.xml (+40/-13) l10n_us/account_tax_template.xml (+145/-18) mrp_repair/mrp_repair.py (+4/-2) point_of_sale/point_of_sale.py (+9/-17) point_of_sale/report/pos_details.py (+2/-2) point_of_sale/test/01_order_to_payment.yml (+4/-12) purchase/purchase.py (+2/-1) sale/sale.py (+2/-1) stock/stock.py (+2/-2) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+221313@code.launchpad.net |
Commit message
Description of the change
- 9468. By Turkesh Patel (openERP)
-
[IMP] remove old fields which were there temp.
Turkesh Patel (openERP) (turkesh-tinyerp) wrote : | # |
Hello Nhomar,
this is the pad https:/
- 9469. By Turkesh Patel (openERP)
-
[IMP] improved code to generate tax.lines from tax.line.template
Nhomar - Vauxoo (nhomar) wrote : | # |
REALLY thanks.
I can't find an important point (and I think it should be done in the core because overwrite taxes is really complex technically speaking).
In Odoo (formelly OpenERP) for historical reasons the VAT is applied on "Invoices" directly to "Income and Outcome Tax." AFAICS it will continue being on this way, but, we have several countries (Mexico, EEUU, Italy AFAICK) where we have 2 stages for every account.tax on invoices:
1.- Tax Invoiced.
2.- Tax effectively paid.
The first one is perfectly managed by the actual behavior even on this merge proposal.
But the second one (which the payment process must to be included) is not possible, then we have in the pad one question not answered yet:
----
Question... (that wait for an answer)
does it make sense to be able to add lines in Journal items ?
----
May be if the answer is "Yes" it can help but I am not sure that it is the correct approach (due to the great simplification done on the configuration process that can be solved in a different way).
We did this approach in a generic way[1] (but so tricky due to technical limitations on this module as it is actually) but We think the concept is clear, we need at least 2 extra accounts on taxes (see the code) on account.tax and account.
It means, if you think this concept of separate "Invoiced" from "Paid" taxes in a configurable way can be included on the core we can document perfectly this module and share all documentation regarding with the "Functional" approach (because honestly I am not ABSOLUTLY SURE if our technical approach was correct, but we are absolutely sure functionally speaking it is a mandatory feature on some countries).
Thanks in advance and again, thanks for this improvements.
- 9470. By Turkesh Patel (openERP)
-
[IMP] improved 'configurable account chart template' taxes as per new model design. improved code to generate tax from tax template.
- 9471. By Turkesh Patel (openERP)
-
[FIX] fixed issue of tax_code_id. use new mapped id of code.
- 9472. By Turkesh Patel (openERP)
-
[MRG] merge with lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa-l10n-tpa
- 9473. By DJ Patel (OpenERP)
-
[FIX] l10n_ma : The value 'none' for the field 'account_
tax_template. type' is not in the selection. - 9474. By DJ Patel (OpenERP)
-
[FIX] l10n_ma : The value 'all' for the field 'account_
tax_template. type' is not in the selection. - 9475. By Turkesh Patel (openERP)
-
[MRG] merge with lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa-l10n-tpa , added account_id in tax templates
- 9476. By Turkesh Patel (openERP)
-
[IMP] improved code to map accounts in account.tax.lines
- 9477. By Turkesh Patel (openERP)
-
[FIX] improved code to add tex lines properly
- 9478. By Turkesh Patel (openERP)
-
[IMP] replace code_sign field by tax_amount
- 9479. By Turkesh Patel (openERP)
-
[IMP]l10n_br, l10n_cn, l10n_gr, l10n_mx, l10n_tr, l10n_us: replace code_sign bt tax_amount
Unmerged revisions
- 9479. By Turkesh Patel (openERP)
-
[IMP]l10n_br, l10n_cn, l10n_gr, l10n_mx, l10n_tr, l10n_us: replace code_sign bt tax_amount
- 9478. By Turkesh Patel (openERP)
-
[IMP] replace code_sign field by tax_amount
- 9477. By Turkesh Patel (openERP)
-
[FIX] improved code to add tex lines properly
- 9476. By Turkesh Patel (openERP)
-
[IMP] improved code to map accounts in account.tax.lines
- 9475. By Turkesh Patel (openERP)
-
[MRG] merge with lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa-l10n-tpa , added account_id in tax templates
- 9474. By DJ Patel (OpenERP)
-
[FIX] l10n_ma : The value 'all' for the field 'account_
tax_template. type' is not in the selection. - 9473. By DJ Patel (OpenERP)
-
[FIX] l10n_ma : The value 'none' for the field 'account_
tax_template. type' is not in the selection. - 9472. By Turkesh Patel (openERP)
-
[MRG] merge with lp:~openerp-dev/openobject-addons/trunk-new-account-tax-design-tpa-l10n-tpa
- 9471. By Turkesh Patel (openERP)
-
[FIX] fixed issue of tax_code_id. use new mapped id of code.
- 9470. By Turkesh Patel (openERP)
-
[IMP] improved 'configurable account chart template' taxes as per new model design. improved code to generate tax from tax template.
Preview Diff
1 | === modified file 'account/__openerp__.py' |
2 | --- account/__openerp__.py 2014-04-29 15:41:04 +0000 |
3 | +++ account/__openerp__.py 2014-06-02 10:31:27 +0000 |
4 | @@ -162,6 +162,7 @@ |
5 | 'test/account_period_close.yml', |
6 | 'test/account_use_model.yml', |
7 | 'test/account_validate_account_move.yml', |
8 | + 'test/account_tax_cal.yml', |
9 | 'test/test_edi_invoice.yml', |
10 | 'test/account_report.yml', |
11 | 'test/account_fiscalyear_close.yml', #last test, as it will definitively close the demo fiscalyear |
12 | |
13 | === modified file 'account/account.py' |
14 | --- account/account.py 2014-04-24 13:45:33 +0000 |
15 | +++ account/account.py 2014-06-02 10:31:27 +0000 |
16 | @@ -24,6 +24,8 @@ |
17 | from dateutil.relativedelta import relativedelta |
18 | from operator import itemgetter |
19 | import time |
20 | +from lxml import etree |
21 | +from openerp.report import report_sxw |
22 | |
23 | import openerp |
24 | from openerp import SUPERUSER_ID |
25 | @@ -87,7 +89,7 @@ |
26 | if amt: |
27 | next_date = (datetime.strptime(date_ref, '%Y-%m-%d') + relativedelta(days=line.days)) |
28 | if line.days2 < 0: |
29 | - next_first_date = next_date + relativedelta(day=1,months=1) #Getting 1st of next month |
30 | + next_first_date = next_date + relativedelta(day=1, months=1) #Getting 1st of next month |
31 | next_date = next_first_date + relativedelta(days=line.days2) |
32 | if line.days2 > 0: |
33 | next_date += relativedelta(day=line.days2, months=1) |
34 | @@ -120,11 +122,11 @@ |
35 | 'days': 30, |
36 | 'days2': 0, |
37 | } |
38 | - _order = "value desc,days" |
39 | + _order = "value desc, days" |
40 | |
41 | def _check_percent(self, cr, uid, ids, context=None): |
42 | obj = self.browse(cr, uid, ids[0], context=context) |
43 | - if obj.value == 'procent' and ( obj.value_amount < 0.0 or obj.value_amount > 1.0): |
44 | + if obj.value == 'procent' and (obj.value_amount < 0.0 or obj.value_amount > 1.0): |
45 | return False |
46 | return True |
47 | |
48 | @@ -239,7 +241,7 @@ |
49 | continue |
50 | jour = self.pool.get('account.journal').browse(cr, uid, args[pos][2], context=context) |
51 | if (not (jour.account_control_ids or jour.type_control_ids)) or not args[pos][2]: |
52 | - args[pos] = ('type','not in',('consolidation','view')) |
53 | + args[pos] = ('type', 'not in', ('consolidation', 'view')) |
54 | continue |
55 | ids3 = map(lambda x: x.id, jour.type_control_ids) |
56 | ids1 = super(account_account, self).search(cr, uid, [('user_type', 'in', ids3)]) |
57 | @@ -366,7 +368,7 @@ |
58 | def _get_company_currency(self, cr, uid, ids, field_name, arg, context=None): |
59 | result = {} |
60 | for rec in self.browse(cr, uid, ids, context=context): |
61 | - result[rec.id] = (rec.company_id.currency_id.id,rec.company_id.currency_id.symbol) |
62 | + result[rec.id] = (rec.company_id.currency_id.id, rec.company_id.currency_id.symbol) |
63 | return result |
64 | |
65 | def _get_child_ids(self, cr, uid, ids, field_name, arg, context=None): |
66 | @@ -427,10 +429,10 @@ |
67 | if move_id: |
68 | move = move_obj.browse(cr, uid, move_id[0], context=context) |
69 | move_obj.write(cr, uid, move_id[0], { |
70 | - name: diff+getattr(move,name) |
71 | + name: diff + getattr(move, name) |
72 | }, context=context) |
73 | else: |
74 | - if diff<0.0: |
75 | + if diff < 0.0: |
76 | raise osv.except_osv(_('Error!'),_("Unable to adapt the initial balance (negative value).")) |
77 | nameinv = (name=='credit' and 'debit') or 'credit' |
78 | move_id = move_obj.create(cr, uid, { |
79 | @@ -452,7 +454,7 @@ |
80 | ('other', 'Regular'), |
81 | ('receivable', 'Receivable'), |
82 | ('payable', 'Payable'), |
83 | - ('liquidity','Liquidity'), |
84 | + ('liquidity', 'Liquidity'), |
85 | ('consolidation', 'Consolidation'), |
86 | ('closed', 'Closed'), |
87 | ], 'Internal Type', required=True, help="The 'Internal Type' is used for features available on "\ |
88 | @@ -648,7 +650,7 @@ |
89 | return True |
90 | |
91 | def _check_allow_type_change(self, cr, uid, ids, new_type, context=None): |
92 | - restricted_groups = ['consolidation','view'] |
93 | + restricted_groups = ['consolidation', 'view'] |
94 | line_obj = self.pool.get('account.move.line') |
95 | for account in self.browse(cr, uid, ids, context=context): |
96 | old_type = account.type |
97 | @@ -687,7 +689,7 @@ |
98 | move_lines = self.pool.get('account.move.line').search(cr, uid, [('account_id', 'in', ids)]) |
99 | if move_lines: |
100 | # Allow the write if the value is the same |
101 | - for i in [i['company_id'][0] for i in self.read(cr,uid,ids,['company_id'])]: |
102 | + for i in [i['company_id'][0] for i in self.read(cr, uid, ids, ['company_id'])]: |
103 | if vals['company_id']!=i: |
104 | raise osv.except_osv(_('Warning!'), _('You cannot change the owner company of an account that already contains journal items.')) |
105 | if 'active' in vals and not vals['active']: |
106 | @@ -729,7 +731,7 @@ |
107 | 'currency': fields.many2one('res.currency', 'Currency', help='The currency used to enter statement'), |
108 | 'entry_posted': fields.boolean('Autopost Created Moves', help='Check this box to automatically post entries of this journal. Note that legally, some entries may be automatically posted when the source document is validated (Invoices), whatever the status of this field.'), |
109 | 'company_id': fields.many2one('res.company', 'Company', required=True, select=1, help="Company related to this journal"), |
110 | - 'allow_date':fields.boolean('Check Date in Period', help= 'If checked, the entry won\'t be created if the entry date is not included into the selected period'), |
111 | + 'allow_date': fields.boolean('Check Date in Period', help= 'If checked, the entry won\'t be created if the entry date is not included into the selected period'), |
112 | 'profit_account_id' : fields.many2one('account.account', 'Profit Account'), |
113 | 'loss_account_id' : fields.many2one('account.account', 'Loss Account'), |
114 | 'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1), |
115 | @@ -1130,7 +1132,7 @@ |
116 | _inherit = "account.fiscalyear" |
117 | _description = "Fiscal Year" |
118 | _columns = { |
119 | - 'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True), |
120 | + 'end_journal_period_id': fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True), |
121 | } |
122 | |
123 | def copy(self, cr, uid, id, default=None, context=None): |
124 | @@ -1215,7 +1217,6 @@ |
125 | else: |
126 | if cond[1] in ['=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of']: |
127 | continue |
128 | - |
129 | cr.execute("select move_id from account_move_line group by move_id having sum(debit) %s %%s" % (cond[1]),(amount,)) |
130 | res_ids = set(id[0] for id in cr.fetchall()) |
131 | ids = ids and (ids & res_ids) or res_ids |
132 | @@ -1242,7 +1243,7 @@ |
133 | }), |
134 | 'amount': fields.function(_amount_compute, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount), |
135 | 'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}, select=True), |
136 | - 'narration':fields.text('Internal Note'), |
137 | + 'narration': fields.text('Internal Note'), |
138 | 'company_id': fields.related('journal_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True), |
139 | 'balance': fields.float('balance', digits_compute=dp.get_precision('Account'), help="This is a field only used for internal purpose and shouldn't be displayed"), |
140 | } |
141 | @@ -1790,7 +1791,7 @@ |
142 | 'line_ids': fields.one2many('account.move.line', 'tax_code_id', 'Lines'), |
143 | 'company_id': fields.many2one('res.company', 'Company', required=True), |
144 | 'sign': fields.float('Coefficent for parent', required=True, help='You can specify here the coefficient that will be used when consolidating the amount of this case into its parent. For example, set 1/-1 if you want to add/substract it.'), |
145 | - 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax code to appear on invoices"), |
146 | + 'notprintable': fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax code to appear on invoices"), |
147 | 'sequence': fields.integer('Sequence', help="Determine the display order in the report 'Accounting \ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"), |
148 | } |
149 | |
150 | @@ -1839,6 +1840,7 @@ |
151 | ] |
152 | _order = 'code' |
153 | |
154 | +TAX_TYPE = [('percent', 'Percentage'), ('fixed', 'Fixed Amount'), ('group', 'Group of Tax'), ('code', 'Python Code'), ('percentage_price_include', 'Percentage based on price included amounts')] |
155 | |
156 | def get_precision_tax(): |
157 | def change_digit_tax(cr): |
158 | @@ -1850,10 +1852,10 @@ |
159 | """ |
160 | A tax object. |
161 | |
162 | - Type: percent, fixed, none, code |
163 | - PERCENT: tax = price * amount |
164 | + Type: percent, fixed, group, code |
165 | + PERCENT: tax = price * amount / 100 |
166 | FIXED: tax = price + amount |
167 | - NONE: no tax line |
168 | + GROUP: tax = tax + .. + tax |
169 | CODE: execute python code. localcontext = {'price_unit':pu} |
170 | return result in the context |
171 | Ex: result=round(price_unit*0.21,4) |
172 | @@ -1871,49 +1873,94 @@ |
173 | _columns = { |
174 | 'name': fields.char('Tax Name', size=64, required=True, translate=True, help="This name will be displayed on reports"), |
175 | 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."), |
176 | - 'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For taxes of type percentage, enter % ratio between 0-1."), |
177 | + 'amount': fields.float('Tax Rate', required=True, digits_compute=get_precision_tax(), help="For taxes of type percentage, enter % between 0-100."), |
178 | 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the tax without removing it."), |
179 | - 'type': fields.selection( [('percent','Percentage'), ('fixed','Fixed Amount'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True, |
180 | + 'type': fields.selection(TAX_TYPE, 'Type of Tax', required=True, |
181 | help="The computation method for the tax amount."), |
182 | 'applicable_type': fields.selection( [('true','Always'), ('code','Given by Python Code')], 'Applicability', required=True, |
183 | help="If not applicable (computed through a Python code), the tax won't appear on the invoice."), |
184 | - 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."), |
185 | - 'account_collected_id':fields.many2one('account.account', 'Invoice Tax Account', help="Set the account that will be set by default on invoice tax lines for invoices. Leave empty to use the expense account."), |
186 | - 'account_paid_id':fields.many2one('account.account', 'Refund Tax Account', help="Set the account that will be set by default on invoice tax lines for refunds. Leave empty to use the expense account."), |
187 | - 'account_analytic_collected_id':fields.many2one('account.analytic.account', 'Invoice Tax Analytic Account', help="Set the analytic account that will be used by default on the invoice tax lines for invoices. Leave empty if you don't want to use an analytic account on the invoice tax lines by default."), |
188 | - 'account_analytic_paid_id':fields.many2one('account.analytic.account', 'Refund Tax Analytic Account', help="Set the analytic account that will be used by default on the invoice tax lines for refunds. Leave empty if you don't want to use an analytic account on the invoice tax lines by default."), |
189 | - 'parent_id':fields.many2one('account.tax', 'Parent Tax Account', select=True), |
190 | - 'child_ids':fields.one2many('account.tax', 'parent_id', 'Child Tax Accounts'), |
191 | - 'child_depend':fields.boolean('Tax on Children', help="Set if the tax computation is based on the computation of child taxes rather than on the total amount."), |
192 | - 'python_compute':fields.text('Python Code'), |
193 | - 'python_compute_inv':fields.text('Python Code (reverse)'), |
194 | + 'python_compute': fields.text('Python Code (invoices)'), |
195 | + 'python_compute_inv': fields.text('Python Code (refunds)'), |
196 | 'python_applicable':fields.text('Applicable Code'), |
197 | - |
198 | - # |
199 | - # Fields used for the Tax declaration |
200 | - # |
201 | - 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the tax declaration."), |
202 | - 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the tax declaration."), |
203 | - 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), |
204 | - 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), |
205 | - |
206 | - # Same fields for refund invoices |
207 | - |
208 | - 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."), |
209 | - 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."), |
210 | - 'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), |
211 | - 'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), |
212 | 'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"), |
213 | 'company_id': fields.many2one('res.company', 'Company', required=True), |
214 | - 'description': fields.char('Tax Code'), |
215 | + 'description': fields.char('Display on Reports'), |
216 | 'price_include': fields.boolean('Tax Included in Price', help="Check this if the price you use on the product and invoices includes this tax."), |
217 | - 'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Application', required=True) |
218 | - |
219 | + 'type_tax_use': fields.selection([('sale', 'Sale'),('purchase', 'Purchase'),('all', 'All Documents')], 'Tax Application', required=True), |
220 | + 'parent_id': fields.many2one('account.tax', 'Parent Tax Account', select=True), |
221 | + 'child_ids': fields.one2many('account.tax', 'parent_id', 'Child Tax Accounts'), |
222 | + 'tax_invoice_line_ids': fields.one2many('account.tax.line', 'tax_id', 'Tax Invoice', domain=[('apply_on','=','invoice')]), |
223 | + 'tax_refund_line_ids': fields.one2many('account.tax.line', 'tax_id', 'Tax Refund', domain=[('apply_on','=','refund')]), |
224 | } |
225 | + |
226 | + def _check_base_line(self, cr, uid, ids, context=None): |
227 | + tax = self.browse(cr, uid, ids[0], context=context) |
228 | + base_count = 0 |
229 | + for tax_line in tax.tax_invoice_line_ids: |
230 | + if tax_line.code_type == 'base': |
231 | + base_count += 1 |
232 | + if base_count > 1: return False |
233 | + return True |
234 | + |
235 | + _constraints = [ |
236 | + (_check_base_line, "Code Type 'Base' should be used only once for tax lines.", ['tax_invoice_line_ids']), |
237 | + ] |
238 | + |
239 | _sql_constraints = [ |
240 | ('name_company_uniq', 'unique(name, company_id)', 'Tax Name must be unique per company!'), |
241 | ] |
242 | |
243 | + def _compute_tax_amount_line(self, base_amount, tax_amount, tax_type, python_compute=None, product=None, partner=None): |
244 | + if tax_type == 'percent': |
245 | + tax_amount = base_amount * tax_amount / 100 |
246 | + elif tax_type == 'code': |
247 | + localdict = {'price_unit': base_amount, 'product': product, 'partner': partner} |
248 | + exec python_compute in localdict |
249 | + if localdict.get('result', False): |
250 | + tax_amount = localdict['result'] |
251 | + elif tax_type == 'fixed': |
252 | + tax_amount = tax_amount |
253 | + return base_amount, tax_amount |
254 | + |
255 | + def onchange_tax_id(self, cr, uid, ids, tax_type, tax_amount, type_tax_use, python_compute=None, price_include=False, context=None): |
256 | + if tax_type in ['group']: |
257 | + return {} |
258 | + base_amount, tax_amount = self._compute_tax_amount_line(100, tax_amount, tax_type, python_compute=python_compute) |
259 | + if tax_type == 'percentage_price_include': |
260 | + price_include = True |
261 | + if tax_type in ('code','group'): |
262 | + price_include = False |
263 | + if price_include: |
264 | + base_amount -= tax_amount |
265 | + tax_invoice_line_ids = [{'code_type': 'base', 'apply_on': 'invoice', 'amount': 100, 'tax_amount': 100}, |
266 | + {'code_type': 'tax', 'apply_on': 'invoice', 'amount': tax_amount, 'base_amount': base_amount, 'tax_amount': tax_amount}] |
267 | + tax_refund_line_ids = [{'code_type': 'base', 'apply_on': 'refund', 'amount': 100, 'tax_amount': -100}, |
268 | + {'code_type': 'tax', 'apply_on': 'refund', 'amount': tax_amount, 'base_amount': base_amount, 'tax_amount': -tax_amount}] |
269 | + return {'value': {'price_include': price_include, 'tax_invoice_line_ids': tax_invoice_line_ids, 'tax_refund_line_ids': tax_refund_line_ids}} |
270 | + |
271 | + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False): |
272 | + if context is None: |
273 | + context = {} |
274 | + res = super(account_tax, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar) |
275 | + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) |
276 | + rml_parser = report_sxw.rml_parse(cr, uid, 'tax_form_parser', context=context) |
277 | + amount_str = rml_parser.formatLang(100, currency_obj=user.company_id.currency_id) |
278 | + doc = etree.XML(res['arch']) |
279 | + for node in doc.xpath("//label[@name='sale_excluded']"): |
280 | + node.set('string', _('Journal Items for a %s sale (taxes excluded)') % (amount_str)) |
281 | + for node in doc.xpath("//label[@name='sale_included']"): |
282 | + node.set('string', _('Journal Items for a %s sale (taxes included)') % (amount_str)) |
283 | + for node in doc.xpath("//label[@name='purchase_excluded']"): |
284 | + node.set('string', _('Journal Items for a %s purchase (taxes excluded)') % (amount_str)) |
285 | + for node in doc.xpath("//label[@name='purchase_included']"): |
286 | + node.set('string', _('Journal Items for a %s purchase (taxes included)') % (amount_str)) |
287 | + for node in doc.xpath("//label[@name='refund_excluded']"): |
288 | + node.set('string', _('Journal Items for a %s refund (taxes excluded)') % (amount_str)) |
289 | + for node in doc.xpath("//label[@name='refund_included']"): |
290 | + node.set('string', _('Journal Items for a %s refund (taxes included)') % (amount_str)) |
291 | + res['arch'] = etree.tostring(doc) |
292 | + return res |
293 | + |
294 | def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): |
295 | """ |
296 | Returns a list of tupples containing id, name, as internally it is called {def name_get} |
297 | @@ -1938,9 +1985,16 @@ |
298 | ids = self.search(cr, user, expression.AND([domain, args]), limit=limit, context=context) |
299 | return self.name_get(cr, user, ids, context=context) |
300 | |
301 | + def create(self, cr, uid, vals, context=None): |
302 | + if vals.get('type', False) and vals['type'] == 'percentage_price_include': |
303 | + vals.update({'price_include': True}) |
304 | + return super(account_tax, self).create(cr, uid, vals, context=context) |
305 | + |
306 | def write(self, cr, uid, ids, vals, context=None): |
307 | if vals.get('type', False) and vals['type'] in ('none', 'code'): |
308 | vals.update({'amount': 0.0}) |
309 | + if vals.get('type', False) and vals['type'] == 'percentage_price_include': |
310 | + vals.update({'price_include': True}) |
311 | return super(account_tax, self).write(cr, uid, ids, vals, context=context) |
312 | |
313 | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): |
314 | @@ -1957,8 +2011,7 @@ |
315 | if context.get('journal_id'): |
316 | journal = journal_pool.browse(cr, uid, context.get('journal_id')) |
317 | if journal.type in ('sale', 'purchase'): |
318 | - args += [('type_tax_use','in',[journal.type,'all'])] |
319 | - |
320 | + args += [('type_tax_use', 'in', [journal.type, 'all'])] |
321 | return super(account_tax, self).search(cr, uid, args, offset, limit, order, context, count) |
322 | |
323 | def name_get(self, cr, uid, ids, context=None): |
324 | @@ -1978,18 +2031,14 @@ |
325 | |
326 | _defaults = { |
327 | 'python_compute': '''# price_unit\n# or False\n# product: product.product object or None\n# partner: res.partner object or None\n\nresult = price_unit * 0.10''', |
328 | - 'python_compute_inv': '''# price_unit\n# product: product.product object or False\n\nresult = price_unit * 0.10''', |
329 | 'applicable_type': 'true', |
330 | + 'python_applicable': '''# price_unit\n# product: product.product object or None\n# partner: res.partner object or None\n\nif price_unit >= 1000:\n result = True''', |
331 | 'type': 'percent', |
332 | 'amount': 0, |
333 | 'price_include': 0, |
334 | 'active': 1, |
335 | 'type_tax_use': 'all', |
336 | 'sequence': 1, |
337 | - 'ref_tax_sign': 1, |
338 | - 'ref_base_sign': 1, |
339 | - 'tax_sign': 1, |
340 | - 'base_sign': 1, |
341 | 'include_base_amount': False, |
342 | 'company_id': _default_company, |
343 | } |
344 | @@ -1998,7 +2047,7 @@ |
345 | def _applicable(self, cr, uid, taxes, price_unit, product=None, partner=None): |
346 | res = [] |
347 | for tax in taxes: |
348 | - if tax.applicable_type=='code': |
349 | + if tax.applicable_type == 'code': |
350 | localdict = {'price_unit':price_unit, 'product':product, 'partner':partner} |
351 | exec tax.python_applicable in localdict |
352 | if localdict.get('result', False): |
353 | @@ -2007,73 +2056,49 @@ |
354 | res.append(tax) |
355 | return res |
356 | |
357 | - def _unit_compute(self, cr, uid, taxes, price_unit, product=None, partner=None, quantity=0): |
358 | + def _unit_compute(self, cr, uid, taxes, price_unit, product=None, partner=None, date=None, apply_on='invoice'): |
359 | + #apply_on: invoice or refund |
360 | taxes = self._applicable(cr, uid, taxes, price_unit ,product, partner) |
361 | res = [] |
362 | - cur_price_unit=price_unit |
363 | + cur_price_unit = price_unit |
364 | for tax in taxes: |
365 | - # we compute the amount for the current tax object and append it to the result |
366 | - data = {'id':tax.id, |
367 | - 'name':tax.description and tax.description + " - " + tax.name or tax.name, |
368 | - 'account_collected_id':tax.account_collected_id.id, |
369 | - 'account_paid_id':tax.account_paid_id.id, |
370 | - 'account_analytic_collected_id': tax.account_analytic_collected_id.id, |
371 | - 'account_analytic_paid_id': tax.account_analytic_paid_id.id, |
372 | - 'base_code_id': tax.base_code_id.id, |
373 | - 'ref_base_code_id': tax.ref_base_code_id.id, |
374 | - 'sequence': tax.sequence, |
375 | - 'base_sign': tax.base_sign, |
376 | - 'tax_sign': tax.tax_sign, |
377 | - 'ref_base_sign': tax.ref_base_sign, |
378 | - 'ref_tax_sign': tax.ref_tax_sign, |
379 | - 'price_unit': cur_price_unit, |
380 | - 'tax_code_id': tax.tax_code_id.id, |
381 | - 'ref_tax_code_id': tax.ref_tax_code_id.id, |
382 | - } |
383 | - res.append(data) |
384 | - if tax.type=='percent': |
385 | - amount = cur_price_unit * tax.amount |
386 | - data['amount'] = amount |
387 | - |
388 | - elif tax.type=='fixed': |
389 | - data['amount'] = tax.amount |
390 | - data['tax_amount']=quantity |
391 | - # data['amount'] = quantity |
392 | - elif tax.type=='code': |
393 | - localdict = {'price_unit':cur_price_unit, 'product':product, 'partner':partner} |
394 | - exec tax.python_compute in localdict |
395 | - amount = localdict['result'] |
396 | - data['amount'] = amount |
397 | - elif tax.type=='balance': |
398 | - data['amount'] = cur_price_unit - reduce(lambda x,y: y.get('amount',0.0)+x, res, 0.0) |
399 | - data['balance'] = cur_price_unit |
400 | - |
401 | - amount2 = data.get('amount', 0.0) |
402 | - if tax.child_ids: |
403 | - if tax.child_depend: |
404 | - latest = res.pop() |
405 | - amount = amount2 |
406 | - child_tax = self._unit_compute(cr, uid, tax.child_ids, amount, product, partner, quantity) |
407 | - res.extend(child_tax) |
408 | - if tax.child_depend: |
409 | - for r in res: |
410 | - for name in ('base','ref_base'): |
411 | - if latest[name+'_code_id'] and latest[name+'_sign'] and not r[name+'_code_id']: |
412 | - r[name+'_code_id'] = latest[name+'_code_id'] |
413 | - r[name+'_sign'] = latest[name+'_sign'] |
414 | - r['price_unit'] = latest['price_unit'] |
415 | - latest[name+'_code_id'] = False |
416 | - for name in ('tax','ref_tax'): |
417 | - if latest[name+'_code_id'] and latest[name+'_sign'] and not r[name+'_code_id']: |
418 | - r[name+'_code_id'] = latest[name+'_code_id'] |
419 | - r[name+'_sign'] = latest[name+'_sign'] |
420 | - r['amount'] = data['amount'] |
421 | - latest[name+'_code_id'] = False |
422 | - if tax.include_base_amount: |
423 | - cur_price_unit+=amount2 |
424 | + tax_lines = [] |
425 | + if apply_on == 'invoice': |
426 | + tax_lines = tax.tax_invoice_line_ids |
427 | + if apply_on == 'refund': |
428 | + tax_lines = tax.tax_refund_line_ids |
429 | + if tax.type == 'group': |
430 | + for child in tax.child_ids: #get child order by sequence |
431 | + child_tax = self._unit_compute(cr, uid, [child], cur_price_unit, product=product, partner=partner, date=date, apply_on=apply_on) |
432 | + for rec in child_tax: |
433 | + if rec.get('code_type') == 'tax' and child.include_base_amount: |
434 | + cur_price_unit += rec.get('amount', 0.0) |
435 | + if rec.get('code_type') == 'tax' and child.price_include: |
436 | + cur_price_unit -= rec.get('amount', 0.0) |
437 | + rec['price_include_in_group'] = True |
438 | + res.extend(child_tax) |
439 | + elif tax_lines: |
440 | + amt = 0 |
441 | + for tax_line in tax_lines: |
442 | + if tax_line.code_type == 'base' and (tax_line.tax_id.type == 'percent' or tax_line.tax_id.type == 'fixed' or tax_line.tax_id.type == 'percentage_price_include') and tax_line.tax_id.price_include: |
443 | + amt = tax_line.amount |
444 | + data = tax_line.compute(price_unit, amt, date=date) |
445 | + data[0]['todo'] = 0 |
446 | + if tax.price_include: |
447 | + data[0]['todo'] = 1 |
448 | + res.extend(data) |
449 | + else: |
450 | + raise osv.except_osv(_('No Tax lines !'),_("You must define Tax lines !")) |
451 | + total = 0.0 |
452 | + for r in res: |
453 | + if r['todo'] and r['code_type'] == 'tax': |
454 | + total += r['amount'] |
455 | + r['todo'] = 0 |
456 | + for r in res: |
457 | + r['price_unit'] -= total |
458 | return res |
459 | |
460 | - def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, force_excluded=False): |
461 | + def compute_all(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None, date=None, apply_on='invoice', force_excluded=False): |
462 | """ |
463 | :param force_excluded: boolean used to say that we don't want to consider the value of field price_include of |
464 | tax. It's used in encoding by line where you don't matter if you encoded a tax with that boolean to True or |
465 | @@ -2084,7 +2109,6 @@ |
466 | 'taxes': [] # List of taxes, see compute for the format |
467 | } |
468 | """ |
469 | - |
470 | # By default, for each tax, tax amount will first be computed |
471 | # and rounded at the 'Account' decimal precision for each |
472 | # PO/SO/invoice line and then these rounded amounts will be |
473 | @@ -2106,144 +2130,114 @@ |
474 | tex.append(tax) |
475 | else: |
476 | tin.append(tax) |
477 | - tin = self.compute_inv(cr, uid, tin, price_unit, quantity, product=product, partner=partner, precision=tax_compute_precision) |
478 | + tin = self._compute(cr, uid, tin, price_unit, quantity, product=product, \ |
479 | + partner=partner, precision=tax_compute_precision, date=date, apply_on=apply_on) |
480 | for r in tin: |
481 | - totalex -= r.get('amount', 0.0) |
482 | + if r.get('code_type') == 'tax': |
483 | + totalex -= r.get('amount', 0.0) |
484 | totlex_qty = 0.0 |
485 | try: |
486 | totlex_qty = totalex/quantity |
487 | except: |
488 | pass |
489 | - tex = self._compute(cr, uid, tex, totlex_qty, quantity, product=product, partner=partner, precision=tax_compute_precision) |
490 | + tex = self._compute(cr, uid, tex, totlex_qty, quantity, product=product, \ |
491 | + partner=partner, precision=tax_compute_precision, date=date, apply_on=apply_on) |
492 | for r in tex: |
493 | - totalin += r.get('amount', 0.0) |
494 | + if r.get('code_type') == 'tax': |
495 | + totalin += r.get('amount', 0.0) |
496 | + #special case of group tax which will have child tax with include price option |
497 | + if r.get('code_type') == 'tax' and r.get('price_include_in_group', False): |
498 | + totalex -= r.get('amount', 0.0) |
499 | return { |
500 | 'total': totalex, |
501 | 'total_included': totalin, |
502 | 'taxes': tin + tex |
503 | } |
504 | |
505 | - def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None): |
506 | + def compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, date=None, apply_on='invoice', context=None): |
507 | _logger.warning("Deprecated, use compute_all(...)['taxes'] instead of compute(...) to manage prices with tax included.") |
508 | - return self._compute(cr, uid, taxes, price_unit, quantity, product, partner) |
509 | + return self._compute(cr, uid, taxes, price_unit, quantity, product, partner, date=date, apply_on=apply_on, context=context) |
510 | |
511 | - def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None): |
512 | + def _compute(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None, date=None, apply_on='invoice', context=None): |
513 | """ |
514 | Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID. |
515 | |
516 | RETURN: |
517 | [ tax ] |
518 | - tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2} |
519 | + tax = {'name':'', 'amount':0.0} |
520 | one tax for each tax id in IDS and their children |
521 | """ |
522 | if not precision: |
523 | precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') |
524 | - res = self._unit_compute(cr, uid, taxes, price_unit, product, partner, quantity) |
525 | + taxes = self._unit_compute(cr, uid, taxes, price_unit, product=product, partner=partner, date=date, apply_on=apply_on) |
526 | total = 0.0 |
527 | - for r in res: |
528 | + for r in taxes: |
529 | if r.get('balance',False): |
530 | r['amount'] = round(r.get('balance', 0.0) * quantity, precision) - total |
531 | else: |
532 | r['amount'] = round(r.get('amount', 0.0) * quantity, precision) |
533 | total += r['amount'] |
534 | - return res |
535 | - |
536 | - def _unit_compute_inv(self, cr, uid, taxes, price_unit, product=None, partner=None): |
537 | - taxes = self._applicable(cr, uid, taxes, price_unit, product, partner) |
538 | - res = [] |
539 | - taxes.reverse() |
540 | - cur_price_unit = price_unit |
541 | - |
542 | - tax_parent_tot = 0.0 |
543 | - for tax in taxes: |
544 | - if (tax.type=='percent') and not tax.include_base_amount: |
545 | - tax_parent_tot += tax.amount |
546 | - |
547 | - for tax in taxes: |
548 | - if (tax.type=='fixed') and not tax.include_base_amount: |
549 | - cur_price_unit -= tax.amount |
550 | - |
551 | - for tax in taxes: |
552 | - if tax.type=='percent': |
553 | - if tax.include_base_amount: |
554 | - amount = cur_price_unit - (cur_price_unit / (1 + tax.amount)) |
555 | - else: |
556 | - amount = (cur_price_unit / (1 + tax_parent_tot)) * tax.amount |
557 | - |
558 | - elif tax.type=='fixed': |
559 | - amount = tax.amount |
560 | - |
561 | - elif tax.type=='code': |
562 | - localdict = {'price_unit':cur_price_unit, 'product':product, 'partner':partner} |
563 | - exec tax.python_compute_inv in localdict |
564 | - amount = localdict['result'] |
565 | - elif tax.type=='balance': |
566 | - amount = cur_price_unit - reduce(lambda x,y: y.get('amount',0.0)+x, res, 0.0) |
567 | - |
568 | - if tax.include_base_amount: |
569 | - cur_price_unit -= amount |
570 | - todo = 0 |
571 | - else: |
572 | - todo = 1 |
573 | - res.append({ |
574 | - 'id': tax.id, |
575 | - 'todo': todo, |
576 | - 'name': tax.name, |
577 | - 'amount': amount, |
578 | - 'account_collected_id': tax.account_collected_id.id, |
579 | - 'account_paid_id': tax.account_paid_id.id, |
580 | - 'account_analytic_collected_id': tax.account_analytic_collected_id.id, |
581 | - 'account_analytic_paid_id': tax.account_analytic_paid_id.id, |
582 | - 'base_code_id': tax.base_code_id.id, |
583 | - 'ref_base_code_id': tax.ref_base_code_id.id, |
584 | - 'sequence': tax.sequence, |
585 | - 'base_sign': tax.base_sign, |
586 | - 'tax_sign': tax.tax_sign, |
587 | - 'ref_base_sign': tax.ref_base_sign, |
588 | - 'ref_tax_sign': tax.ref_tax_sign, |
589 | - 'price_unit': cur_price_unit, |
590 | - 'tax_code_id': tax.tax_code_id.id, |
591 | - 'ref_tax_code_id': tax.ref_tax_code_id.id, |
592 | - }) |
593 | - if tax.child_ids: |
594 | - if tax.child_depend: |
595 | - del res[-1] |
596 | - amount = price_unit |
597 | - |
598 | - parent_tax = self._unit_compute_inv(cr, uid, tax.child_ids, amount, product, partner) |
599 | - res.extend(parent_tax) |
600 | - |
601 | - total = 0.0 |
602 | - for r in res: |
603 | - if r['todo']: |
604 | - total += r['amount'] |
605 | - for r in res: |
606 | - r['price_unit'] -= total |
607 | - r['todo'] = 0 |
608 | - return res |
609 | - |
610 | - def compute_inv(self, cr, uid, taxes, price_unit, quantity, product=None, partner=None, precision=None): |
611 | - """ |
612 | - Compute tax values for given PRICE_UNIT, QUANTITY and a buyer/seller ADDRESS_ID. |
613 | - Price Unit is a Tax included price |
614 | - |
615 | - RETURN: |
616 | - [ tax ] |
617 | - tax = {'name':'', 'amount':0.0, 'account_collected_id':1, 'account_paid_id':2} |
618 | - one tax for each tax id in IDS and their children |
619 | - """ |
620 | - if not precision: |
621 | - precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') |
622 | - res = self._unit_compute_inv(cr, uid, taxes, price_unit, product, partner=None) |
623 | - total = 0.0 |
624 | - for r in res: |
625 | - if r.get('balance',False): |
626 | - r['amount'] = round(r['balance'] * quantity, precision) - total |
627 | - else: |
628 | - r['amount'] = round(r['amount'] * quantity, precision) |
629 | - total += r['amount'] |
630 | - return res |
631 | - |
632 | + return taxes |
633 | + |
634 | +class AccountTaxLine(osv.Model): |
635 | + _name = 'account.tax.line' |
636 | + |
637 | + def compute(self, cr, uid, ids, price_unit, amt, date=None, context=None): |
638 | + if date is None: |
639 | + date = fields.date.context_today(self, cr, uid, context=context) |
640 | + taxes = [] |
641 | + for tax_line in self.browse(cr, uid, ids, context=context): |
642 | + if tax_line.code_type == 'tax' and tax_line.tax_id.type == 'fixed': |
643 | + amount = tax_line.amount |
644 | + price_unit = tax_line.tax_id.price_include and amt == tax_line.base_amount and tax_line.base_amount or price_unit |
645 | + elif amt and amt == tax_line.base_amount: |
646 | + amount = (tax_line.amount / 100) * price_unit |
647 | + elif tax_line.code_type == 'base': |
648 | + amount = (tax_line.amount / 100) * price_unit |
649 | + else: |
650 | + amount = (tax_line.tax_id.price_include or amt != tax_line.base_amount) and (tax_line.amount / 100) * price_unit * (tax_line.base_amount / 100) or (tax_line.amount / 100) * price_unit |
651 | + taxes.append({ |
652 | + 'name': tax_line.description and tax_line.description + " - " + tax_line.tax_id.name or tax_line.tax_id.name, |
653 | + 'sequence': tax_line.sequence, |
654 | + 'tax_id': tax_line.tax_id.id, |
655 | + 'code_id': tax_line.code_id and tax_line.code_id.id or False, |
656 | + 'account_id': tax_line.account_id and tax_line.account_id.id or False, |
657 | + 'analytic_account_id': tax_line.analytic_account_id and tax_line.analytic_account_id.id or False, |
658 | + 'price_unit': price_unit, |
659 | + 'code_type': tax_line.code_type, |
660 | + 'tax_amount': tax_line.tax_amount, |
661 | + 'amount': amount or 0.0, |
662 | + 'base_amount': tax_line.base_amount or False, |
663 | + }) |
664 | + return taxes |
665 | + |
666 | + _columns = { |
667 | + 'code_type': fields.selection([('base','Base'),('tax','Tax')], "Code Type"), |
668 | + 'tax_amount': fields.float('Amount to report in the Tax Statement', help="Amount to report in the Tax Statement."), |
669 | + 'apply_on': fields.selection([('invoice','Invoice'),('refund','Refund')], "Apply On", required=True), |
670 | + 'code_id': fields.many2one('account.tax.code', 'Section in the Tax Statement', help="Use this code for the tax declaration."), |
671 | + 'account_id': fields.many2one('account.account', 'Tax Account', help="Set the account that will be set by default on invoice tax lines for invoices or refund. Leave empty to use the expense account."), |
672 | + 'analytic_account_id': fields.many2one('account.analytic.account', 'Tax Analytic Account', help="Set the analytic account that will be used by default on the invoice tax lines for invoices or Refunds. Leave empty if you don't want to use an analytic account on the invoice tax lines by default."), |
673 | + 'amount': fields.float('Tax/Base Amount', required=True, digits_compute=dp.get_precision('Account')), |
674 | + 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."), |
675 | + 'tax_id': fields.many2one('account.tax','Tax', ondelete="cascade"), |
676 | + 'company_id': fields.related('tax_id','company_id', type='many2one', relation='res.company', string='Company'), |
677 | + 'description': fields.char('Display'), |
678 | + 'base_amount': fields.float('Base for Computation', help="Use this to define different base amount for current tax line"), |
679 | + #will remove after conformation. |
680 | + 'code_sign': fields.float('Amount to report in the Tax Statement', help="Amount to report in the Tax Statement."), |
681 | + } |
682 | + _defaults = { |
683 | + 'sequence': 1, |
684 | + 'code_type': 'base', |
685 | + 'tax_amount': 1, |
686 | + 'apply_on': 'invoice', |
687 | + 'base_amount': 100.0, |
688 | + } |
689 | + _order = 'sequence' |
690 | + |
691 | + def onchange_amount(self, cr, uid, ids, amount=False, context=None): |
692 | + return {'value': {'tax_amount': context and 'default_apply_on' in context and context['default_apply_on'] == 'refund' and -amount or amount}} |
693 | |
694 | # --------------------------------------------------------- |
695 | # Account Entries Models |
696 | @@ -2516,7 +2510,7 @@ |
697 | 'shortcut': fields.char('Shortcut', size=12), |
698 | 'note': fields.text('Note'), |
699 | 'parent_id': fields.many2one('account.account.template', 'Parent Account Template', ondelete='cascade', domain=[('type','=','view')]), |
700 | - 'child_parent_ids':fields.one2many('account.account.template', 'parent_id', 'Children'), |
701 | + 'child_parent_ids': fields.one2many('account.account.template', 'parent_id', 'Children'), |
702 | 'tax_ids': fields.many2many('account.tax.template', 'account_account_template_tax_rel', 'account_id', 'tax_id', 'Default Taxes'), |
703 | 'nocreate': fields.boolean('Optional create', help="If checked, the new chart of accounts will not contain this by default."), |
704 | 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', help="This optional field allow you to link an account template to a specific chart template that may differ from the one its root parent belongs to. This allow you to define chart templates that extend another and complete it with few new accounts (You don't need to define the whole structure that is common to both several times)."), |
705 | @@ -2634,7 +2628,7 @@ |
706 | return res and res[0] or False |
707 | |
708 | _columns = { |
709 | - 'cparent_id':fields.many2one('account.account', 'Parent target', help="Creates an account with the selected template under this existing parent.", required=True), |
710 | + 'cparent_id': fields.many2one('account.account', 'Parent target', help="Creates an account with the selected template under this existing parent.", required=True), |
711 | } |
712 | _defaults = { |
713 | 'cparent_id': _get_def_cparent, |
714 | @@ -2680,7 +2674,7 @@ |
715 | 'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True), |
716 | 'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'), |
717 | 'sign': fields.float('Sign For Parent', required=True), |
718 | - 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax Code to appear on invoices."), |
719 | + 'notprintable': fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any tax related to this tax Code to appear on invoices."), |
720 | } |
721 | |
722 | _defaults = { |
723 | @@ -2770,48 +2764,117 @@ |
724 | 'complete_tax_set': True, |
725 | } |
726 | |
727 | +class AccountTaxLineTemplate(osv.Model): |
728 | + _name = 'account.tax.line.template' |
729 | + _order = 'sequence' |
730 | + |
731 | + _columns = { |
732 | + 'code_type': fields.selection([('base','Base'),('tax','Tax')], "Code Type"), |
733 | + 'tax_amount': fields.float('Amount to report in the Tax Statement', help="Amount to report in the Tax Statement."), |
734 | + 'apply_on': fields.selection([('invoice','Invoice'),('refund','Refund')], "Apply On", required=True), |
735 | + 'code_id': fields.many2one('account.tax.code.template', 'Section in the Tax Statement', help="Use this code for the tax declaration."), |
736 | + 'account_id': fields.many2one('account.account.template', 'Tax Account', help="Set the account that will be set by default on invoice tax lines for invoices or refund. Leave empty to use the expense account."), |
737 | + 'analytic_account_id': fields.many2one('account.analytic.account', 'Tax Analytic Account', help="Set the analytic account that will be used by default on the invoice tax lines for invoices or Refunds. Leave empty if you don't want to use an analytic account on the invoice tax lines by default."), |
738 | + 'amount': fields.float('Tax/Base Amount', required=True, digits_compute=dp.get_precision('Account')), |
739 | + 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."), |
740 | + 'tax_id': fields.many2one('account.tax.template','Tax', ondelete="cascade"), |
741 | + 'description': fields.char('Display'), |
742 | + 'base_amount': fields.float('Base for Computation', help="Use this to define different base amount for current tax line"), |
743 | + #will remove after confirmation. |
744 | + 'code_sign': fields.float('Amount to report in the Tax Statement', help="Amount to report in the Tax Statement."), |
745 | + } |
746 | + _defaults = { |
747 | + 'sequence': 1, |
748 | + 'code_type': 'base', |
749 | + 'tax_amount': 1, |
750 | + 'apply_on': 'invoice', |
751 | + 'base_amount': 100.0, |
752 | + } |
753 | + |
754 | + def onchange_amount(self, cr, uid, ids, amount=False, context=None): |
755 | + return {'value': {'tax_amount': context and 'default_apply_on' in context and context['default_apply_on'] == 'refund' and -amount or amount}} |
756 | + |
757 | + def generate_tax_line(self, cr, uid, line_ids, tax_code_template_ref, context=None): |
758 | + """ |
759 | + This method for generating lines from templates. |
760 | + """ |
761 | + if context is None: |
762 | + context = {} |
763 | + tax_lines, line_accounts = [], {} |
764 | + obj_tax_line = self.pool.get('account.tax.line') |
765 | + for tax_line in line_ids: |
766 | + vals = { |
767 | + 'code_type': tax_line.code_type, |
768 | + 'tax_amount': tax_line.tax_amount, |
769 | + 'amount': tax_line.amount, |
770 | + 'apply_on': tax_line.apply_on, |
771 | + 'code_id': tax_line.code_id and ((tax_line.code_id.id in tax_code_template_ref) and tax_code_template_ref[tax_line.code_id.id]) or False, |
772 | + 'analytic_account_id': tax_line.analytic_account_id.id, |
773 | + 'sequence': tax_line.sequence, |
774 | + 'description': tax_line.description, |
775 | + 'base_amount': tax_line.base_amount, |
776 | + } |
777 | + new_line = obj_tax_line.create(cr, uid, vals, context=context) |
778 | + line_accounts[new_line] = tax_line.account_id and tax_line.account_id.id or False |
779 | + tax_lines.append(new_line) |
780 | + return { 'tax_lines' : tax_lines, 'line_accounts': line_accounts} |
781 | |
782 | class account_tax_template(osv.osv): |
783 | - |
784 | _name = 'account.tax.template' |
785 | _description = 'Templates for Taxes' |
786 | |
787 | _columns = { |
788 | - 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True), |
789 | - 'name': fields.char('Tax Name', size=64, required=True), |
790 | - 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."), |
791 | - 'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."), |
792 | - 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True), |
793 | - 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."), |
794 | - 'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."), |
795 | - 'account_collected_id':fields.many2one('account.account.template', 'Invoice Tax Account'), |
796 | - 'account_paid_id':fields.many2one('account.account.template', 'Refund Tax Account'), |
797 | - 'parent_id':fields.many2one('account.tax.template', 'Parent Tax Account', select=True), |
798 | - 'child_depend':fields.boolean('Tax on Children', help="Set if the tax computation is based on the computation of child taxes rather than on the total amount."), |
799 | - 'python_compute':fields.text('Python Code'), |
800 | - 'python_compute_inv':fields.text('Python Code (reverse)'), |
801 | + 'name': fields.char('Tax Name', size=64, required=True, translate=True, help="This name will be displayed on reports"), |
802 | + 'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the tax lines from the lowest sequences to the higher ones. The order is important if you have a tax with several tax children. In this case, the evaluation order is important."), |
803 | + 'amount': fields.float('Tax Rate', required=True, digits_compute=get_precision_tax(), help="For taxes of type percentage, enter % between 0-100."), |
804 | + 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the tax without removing it."), |
805 | + 'type': fields.selection(TAX_TYPE, 'Type of Tax', required=True, |
806 | + help="The computation method for the tax amount."), |
807 | + 'applicable_type': fields.selection( [('true','Always'), ('code','Given by Python Code')], 'Applicability', required=True, |
808 | + help="If not applicable (computed through a Python code), the tax won't appear on the invoice."), |
809 | + 'python_compute': fields.text('Python Code (invoices)'), |
810 | + 'python_compute_inv': fields.text('Python Code (refunds)'), |
811 | 'python_applicable':fields.text('Applicable Code'), |
812 | - |
813 | - # |
814 | - # Fields used for the Tax declaration |
815 | - # |
816 | - 'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the tax declaration."), |
817 | - 'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the tax declaration."), |
818 | - 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), |
819 | - 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), |
820 | - |
821 | - # Same fields for refund invoices |
822 | - |
823 | - 'ref_base_code_id': fields.many2one('account.tax.code.template', 'Refund Base Code', help="Use this code for the tax declaration."), |
824 | - 'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Refund Tax Code', help="Use this code for the tax declaration."), |
825 | - 'ref_base_sign': fields.float('Refund Base Code Sign', help="Usually 1 or -1."), |
826 | - 'ref_tax_sign': fields.float('Refund Tax Code Sign', help="Usually 1 or -1."), |
827 | - 'include_base_amount': fields.boolean('Include in Base Amount', help="Set if the amount of tax must be included in the base amount before computing the next taxes."), |
828 | - 'description': fields.char('Internal Name'), |
829 | - 'type_tax_use': fields.selection([('sale','Sale'),('purchase','Purchase'),('all','All')], 'Tax Use In', required=True,), |
830 | + 'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"), |
831 | + 'description': fields.char('Display on Reports'), |
832 | 'price_include': fields.boolean('Tax Included in Price', help="Check this if the price you use on the product and invoices includes this tax."), |
833 | + 'type_tax_use': fields.selection([('sale', 'Sale'),('purchase', 'Purchase'),('all', 'All Documents')], 'Tax Application', required=True), |
834 | + 'parent_id': fields.many2one('account.tax.template', 'Parent Tax Account', select=True), |
835 | + 'child_ids': fields.one2many('account.tax.template', 'parent_id', 'Child Tax Accounts'), |
836 | + 'tax_invoice_line_ids': fields.one2many('account.tax.line.template', 'tax_id', 'Tax Invoice', domain=[('apply_on','=','invoice')]), |
837 | + 'tax_refund_line_ids': fields.one2many('account.tax.line.template', 'tax_id', 'Tax Refund', domain=[('apply_on','=','refund')]), |
838 | + 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True), |
839 | } |
840 | |
841 | + def _compute_tax_amount_line(self, base_amount, tax_amount, tax_type, python_compute=None, product=None, partner=None): |
842 | + if tax_type == 'percent': |
843 | + tax_amount = base_amount * tax_amount / 100 |
844 | + elif tax_type == 'code': |
845 | + localdict = {'price_unit': base_amount, 'product': product, 'partner': partner} |
846 | + exec python_compute in localdict |
847 | + if localdict.get('result', False): |
848 | + tax_amount = localdict['result'] |
849 | + elif tax_type == 'fixed': |
850 | + tax_amount = tax_amount |
851 | + return base_amount, tax_amount |
852 | + |
853 | + def onchange_tax_id(self, cr, uid, ids, tax_type, tax_amount, type_tax_use, python_compute=None, price_include=False, context=None): |
854 | + if tax_type in ['group']: |
855 | + return {} |
856 | + base_amount, tax_amount = self._compute_tax_amount_line(100, tax_amount, tax_type, python_compute=python_compute) |
857 | + if tax_type == 'percentage_price_include': |
858 | + price_include = True |
859 | + if tax_type in ('code','group'): |
860 | + price_include = False |
861 | + if price_include: |
862 | + base_amount -= tax_amount |
863 | + tax_invoice_line_ids = [{'code_type': 'base', 'apply_on': 'invoice', 'amount': 100, 'tax_amount': 100}, |
864 | + {'code_type': 'tax', 'apply_on': 'invoice', 'amount': tax_amount, 'base_amount': base_amount, 'tax_amount': tax_amount}] |
865 | + tax_refund_line_ids = [{'code_type': 'base', 'apply_on': 'refund', 'amount': 100, 'tax_amount': -100}, |
866 | + {'code_type': 'tax', 'apply_on': 'refund', 'amount': tax_amount, 'base_amount': base_amount, 'tax_amount': -tax_amount}] |
867 | + return {'value': {'price_include': price_include, 'tax_invoice_line_ids': tax_invoice_line_ids, 'tax_refund_line_ids': tax_refund_line_ids}} |
868 | + |
869 | + |
870 | def name_get(self, cr, uid, ids, context=None): |
871 | if not ids: |
872 | return [] |
873 | @@ -2829,19 +2892,17 @@ |
874 | |
875 | _defaults = { |
876 | 'python_compute': lambda *a: '''# price_unit\n# product: product.product object or None\n# partner: res.partner object or None\n\nresult = price_unit * 0.10''', |
877 | - 'python_compute_inv': lambda *a: '''# price_unit\n# product: product.product object or False\n\nresult = price_unit * 0.10''', |
878 | 'applicable_type': 'true', |
879 | + 'python_applicable': '''# price_unit\n# product: product.product object or None\n# partner: res.partner object or None\n\nif price_unit >= 1000:\n result = True''', |
880 | 'type': 'percent', |
881 | 'amount': 0, |
882 | 'sequence': 1, |
883 | - 'ref_tax_sign': 1, |
884 | - 'ref_base_sign': 1, |
885 | - 'tax_sign': 1, |
886 | - 'base_sign': 1, |
887 | 'include_base_amount': False, |
888 | 'type_tax_use': 'all', |
889 | 'price_include': 0, |
890 | + 'active': True, |
891 | } |
892 | + |
893 | _order = 'sequence' |
894 | |
895 | def _generate_tax(self, cr, uid, tax_templates, tax_code_template_ref, company_id, context=None): |
896 | @@ -2862,44 +2923,35 @@ |
897 | res = {} |
898 | todo_dict = {} |
899 | tax_template_to_tax = {} |
900 | + tax_obj = self.pool.get('account.tax') |
901 | + obj_tax_line_temp = self.pool.get('account.tax.line.template') |
902 | for tax in tax_templates: |
903 | + #Generate tax lines |
904 | + tax_invoice_lines = obj_tax_line_temp.generate_tax_line(cr, uid, tax.tax_invoice_line_ids, tax_code_template_ref, context=context) |
905 | + todo_dict.update(tax_invoice_lines['line_accounts']) |
906 | + tax_refund_lines = obj_tax_line_temp.generate_tax_line(cr, uid, tax.tax_refund_line_ids, tax_code_template_ref, context=context) |
907 | + todo_dict.update(tax_refund_lines['line_accounts']) |
908 | vals_tax = { |
909 | - 'name':tax.name, |
910 | + 'name': tax.name, |
911 | 'sequence': tax.sequence, |
912 | 'amount': tax.amount, |
913 | 'type': tax.type, |
914 | 'applicable_type': tax.applicable_type, |
915 | - 'domain': tax.domain, |
916 | 'parent_id': tax.parent_id and ((tax.parent_id.id in tax_template_to_tax) and tax_template_to_tax[tax.parent_id.id]) or False, |
917 | - 'child_depend': tax.child_depend, |
918 | 'python_compute': tax.python_compute, |
919 | - 'python_compute_inv': tax.python_compute_inv, |
920 | 'python_applicable': tax.python_applicable, |
921 | - 'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False, |
922 | - 'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False, |
923 | - 'base_sign': tax.base_sign, |
924 | - 'tax_sign': tax.tax_sign, |
925 | - 'ref_base_code_id': tax.ref_base_code_id and ((tax.ref_base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.ref_base_code_id.id]) or False, |
926 | - 'ref_tax_code_id': tax.ref_tax_code_id and ((tax.ref_tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.ref_tax_code_id.id]) or False, |
927 | - 'ref_base_sign': tax.ref_base_sign, |
928 | - 'ref_tax_sign': tax.ref_tax_sign, |
929 | 'include_base_amount': tax.include_base_amount, |
930 | 'description': tax.description, |
931 | - 'company_id': company_id, |
932 | 'type_tax_use': tax.type_tax_use, |
933 | - 'price_include': tax.price_include |
934 | + 'price_include': tax.price_include, |
935 | + 'tax_invoice_line_ids': [(4, line) for line in tax_invoice_lines['tax_lines']], |
936 | + 'tax_refund_line_ids': [(4, line) for line in tax_refund_lines['tax_lines']], |
937 | } |
938 | - new_tax = self.pool.get('account.tax').create(cr, uid, vals_tax) |
939 | + new_tax = tax_obj.create(cr, uid, vals_tax) |
940 | tax_template_to_tax[tax.id] = new_tax |
941 | - #as the accounts have not been created yet, we have to wait before filling these fields |
942 | - todo_dict[new_tax] = { |
943 | - 'account_collected_id': tax.account_collected_id and tax.account_collected_id.id or False, |
944 | - 'account_paid_id': tax.account_paid_id and tax.account_paid_id.id or False, |
945 | - } |
946 | res.update({'tax_template_to_tax': tax_template_to_tax, 'account_dict': todo_dict}) |
947 | return res |
948 | |
949 | - |
950 | # Fiscal Position Templates |
951 | |
952 | class account_fiscal_position_template(osv.osv): |
953 | @@ -2991,12 +3043,12 @@ |
954 | _inherit = 'res.config' |
955 | |
956 | _columns = { |
957 | - 'company_id':fields.many2one('res.company', 'Company', required=True), |
958 | + 'company_id': fields.many2one('res.company', 'Company', required=True), |
959 | 'currency_id': fields.many2one('res.currency', 'Currency', help="Currency as per company's country."), |
960 | 'only_one_chart_template': fields.boolean('Only One Chart Template Available'), |
961 | 'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True), |
962 | 'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Cash and Banks', required=True), |
963 | - 'code_digits':fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"), |
964 | + 'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"), |
965 | "sale_tax": fields.many2one("account.tax.template", "Default Sale Tax"), |
966 | "purchase_tax": fields.many2one("account.tax.template", "Default Purchase Tax"), |
967 | 'sale_tax_rate': fields.float('Sales Tax(%)'), |
968 | @@ -3322,12 +3374,14 @@ |
969 | account_ref.update(account_template_ref) |
970 | |
971 | # writing account values on tax after creation of accounts |
972 | - for key,value in generated_tax_res['account_dict'].items(): |
973 | - if value['account_collected_id'] or value['account_paid_id']: |
974 | - obj_acc_tax.write(cr, uid, [key], { |
975 | - 'account_collected_id': account_ref.get(value['account_collected_id'], False), |
976 | - 'account_paid_id': account_ref.get(value['account_paid_id'], False), |
977 | - }) |
978 | + for key,value in generated_tax_res['tax_template_to_tax'].items(): |
979 | + tax = obj_acc_tax.browse(cr, uid, value) |
980 | + for invoice_tax_line in tax.tax_invoice_line_ids: |
981 | + if invoice_tax_line.code_type == 'tax': |
982 | + invoice_tax_line.write({'account_id': account_ref.get(generated_tax_res['account_dict'][invoice_tax_line.id], False)}) |
983 | + for refund_tax_line in tax.tax_refund_line_ids: |
984 | + if refund_tax_line.code_type == 'tax': |
985 | + refund_tax_line.write({'account_id': account_ref.get(generated_tax_res['account_dict'][refund_tax_line.id], False)}) |
986 | |
987 | # Create Journals |
988 | self.generate_journals(cr, uid, template_id, account_ref, company_id, context=context) |
989 | @@ -3423,7 +3477,6 @@ |
990 | ''' |
991 | obj_data = self.pool.get('ir.model.data') |
992 | obj_journal = self.pool.get('account.journal') |
993 | - |
994 | |
995 | # we need to loop again to find next number for journal code |
996 | # because we can't rely on the value current_num as, |
997 | @@ -3450,7 +3503,6 @@ |
998 | } |
999 | if line['currency_id']: |
1000 | vals['currency'] = line['currency_id'] |
1001 | - |
1002 | return vals |
1003 | |
1004 | def _prepare_bank_account(self, cr, uid, line, new_code, acc_template_ref, ref_acc_bank, company_id, context=None): |
1005 | |
1006 | === modified file 'account/account_invoice.py' |
1007 | --- account/account_invoice.py 2014-05-07 17:01:12 +0000 |
1008 | +++ account/account_invoice.py 2014-06-02 10:31:27 +0000 |
1009 | @@ -306,7 +306,7 @@ |
1010 | }, help="It indicates that the invoice has been paid and the journal entry of the invoice has been reconciled with one or several journal entries of payment."), |
1011 | 'partner_bank_id': fields.many2one('res.partner.bank', 'Bank Account', |
1012 | help='Bank Account Number to which the invoice will be paid. A Company bank account if this is a Customer Invoice or Supplier Refund, otherwise a Partner bank account number.', readonly=True, states={'draft':[('readonly',False)]}), |
1013 | - 'move_lines':fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'), |
1014 | + 'move_lines': fields.function(_get_lines, type='many2many', relation='account.move.line', string='Entry Lines'), |
1015 | 'residual': fields.function(_amount_residual, digits_compute=dp.get_precision('Account'), string='Balance', |
1016 | store={ |
1017 | 'account.invoice': (lambda self, cr, uid, ids, c={}: ids, ['invoice_line','move_id'], 50), |
1018 | @@ -1382,8 +1382,13 @@ |
1019 | tax_obj = self.pool.get('account.tax') |
1020 | cur_obj = self.pool.get('res.currency') |
1021 | for line in self.browse(cr, uid, ids): |
1022 | + apply_on = 'refund' |
1023 | + if line.invoice_id.type in ['out_invoice','in_invoice']: |
1024 | + apply_on = 'invoice' |
1025 | price = line.price_unit * (1-(line.discount or 0.0)/100.0) |
1026 | - taxes = tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, price, line.quantity, product=line.product_id, partner=line.invoice_id.partner_id) |
1027 | + taxes = tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, price, line.quantity, \ |
1028 | + product=line.product_id, partner=line.invoice_id.partner_id, \ |
1029 | + date=line.invoice_id.date_invoice, apply_on=apply_on) |
1030 | res[line.id] = taxes['total'] |
1031 | if line.invoice_id: |
1032 | cur = line.invoice_id.currency_id |
1033 | @@ -1403,7 +1408,7 @@ |
1034 | taxes = l[2].get('invoice_line_tax_id') |
1035 | if len(taxes[0]) >= 3 and taxes[0][2]: |
1036 | taxes = tax_obj.browse(cr, uid, list(taxes[0][2])) |
1037 | - for tax in tax_obj.compute_all(cr, uid, taxes, p,l[2].get('quantity'), l[2].get('product_id', False), context.get('partner_id', False))['taxes']: |
1038 | + for tax in tax_obj.compute_all(cr, uid, taxes, p, l[2].get('quantity'), l[2].get('product_id', False), context.get('partner_id', False))['taxes']: |
1039 | t = t - tax['amount'] |
1040 | return t |
1041 | return 0 |
1042 | @@ -1568,7 +1573,11 @@ |
1043 | if context is None: |
1044 | context = {} |
1045 | inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) |
1046 | - company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id |
1047 | + company_currency = inv.company_id.currency_id.id |
1048 | + |
1049 | + apply_on = 'refund' |
1050 | + if inv.type in ('out_invoice', 'in_invoice'): |
1051 | + apply_on = 'invoice' |
1052 | for line in inv.invoice_line: |
1053 | mres = self.move_line_get_item(cr, uid, line, context) |
1054 | if not mres: |
1055 | @@ -1577,28 +1586,20 @@ |
1056 | tax_code_found= False |
1057 | for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, |
1058 | (line.price_unit * (1.0 - (line['discount'] or 0.0) / 100.0)), |
1059 | - line.quantity, line.product_id, |
1060 | - inv.partner_id)['taxes']: |
1061 | - |
1062 | - if inv.type in ('out_invoice', 'in_invoice'): |
1063 | - tax_code_id = tax['base_code_id'] |
1064 | - tax_amount = line.price_subtotal * tax['base_sign'] |
1065 | - else: |
1066 | - tax_code_id = tax['ref_base_code_id'] |
1067 | - tax_amount = line.price_subtotal * tax['ref_base_sign'] |
1068 | - |
1069 | - if tax_code_found: |
1070 | - if not tax_code_id: |
1071 | - continue |
1072 | - res.append(self.move_line_get_item(cr, uid, line, context)) |
1073 | - res[-1]['price'] = 0.0 |
1074 | - res[-1]['account_analytic_id'] = False |
1075 | - elif not tax_code_id: |
1076 | - continue |
1077 | - tax_code_found = True |
1078 | - |
1079 | - res[-1]['tax_code_id'] = tax_code_id |
1080 | - res[-1]['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, tax_amount, context={'date': inv.date_invoice}) |
1081 | + line.quantity, |
1082 | + line.product_id, |
1083 | + inv.partner_id, date=inv.date_invoice, apply_on=apply_on)['taxes']: |
1084 | + if tax['code_type'] == 'base': |
1085 | + if not tax_code_found and tax['code_id']: |
1086 | + res[-1]['tax_code_id'] = tax['code_id'] |
1087 | + res[-1]['tax_amount'] = tax['code_id'] and (tax['tax_amount'] >= 0 and tax['price_unit'] * line.quantity or -tax['price_unit'] * line.quantity) or 0.0 |
1088 | + elif tax_code_found and tax['code_id']: |
1089 | + res.append(self.move_line_get_item(cr, uid, line, context)) |
1090 | + res[-1]['price'] = 0.0 |
1091 | + res[-1]['account_analytic_id'] = False |
1092 | + res[-1]['tax_code_id'] = tax['code_id'] |
1093 | + res[-1]['tax_amount'] = tax['tax_amount'] >= 0 and tax['price_unit'] * line.quantity or -tax['price_unit'] * line.quantity |
1094 | + tax_code_found = True |
1095 | return res |
1096 | |
1097 | def move_line_get_item(self, cr, uid, line, context=None): |
1098 | @@ -1671,7 +1672,8 @@ |
1099 | 'tax_amount': fields.float('Tax Code Amount', digits_compute=dp.get_precision('Account')), |
1100 | 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), |
1101 | 'factor_base': fields.function(_count_factor, string='Multipication factor for Base code', type='float', multi="all"), |
1102 | - 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all") |
1103 | + 'factor_tax': fields.function(_count_factor, string='Multipication factor Tax code', type='float', multi="all"), |
1104 | + 'tax_id': fields.many2one('account.tax', 'Tax', ondelete='cascade'), |
1105 | } |
1106 | |
1107 | def base_change(self, cr, uid, ids, base, currency_id=False, company_id=False, date_invoice=False): |
1108 | @@ -1706,38 +1708,36 @@ |
1109 | 'base_amount': 0.0, |
1110 | 'tax_amount': 0.0, |
1111 | } |
1112 | + |
1113 | def compute(self, cr, uid, invoice_id, context=None): |
1114 | tax_grouped = {} |
1115 | tax_obj = self.pool.get('account.tax') |
1116 | cur_obj = self.pool.get('res.currency') |
1117 | inv = self.pool.get('account.invoice').browse(cr, uid, invoice_id, context=context) |
1118 | cur = inv.currency_id |
1119 | - company_currency = self.pool['res.company'].browse(cr, uid, inv.company_id.id).currency_id.id |
1120 | + company_currency = inv.company_id.currency_id.id |
1121 | + apply_on = 'refund' |
1122 | + if inv.type in ['out_invoice','in_invoice']: |
1123 | + apply_on = 'invoice' |
1124 | for line in inv.invoice_line: |
1125 | - for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit* (1-(line.discount or 0.0)/100.0)), line.quantity, line.product_id, inv.partner_id)['taxes']: |
1126 | - val={} |
1127 | - val['invoice_id'] = inv.id |
1128 | - val['name'] = tax['name'] |
1129 | - val['amount'] = tax['amount'] |
1130 | - val['manual'] = False |
1131 | - val['sequence'] = tax['sequence'] |
1132 | - val['base'] = cur_obj.round(cr, uid, cur, tax['price_unit'] * line['quantity']) |
1133 | - |
1134 | - if inv.type in ('out_invoice','in_invoice'): |
1135 | - val['base_code_id'] = tax['base_code_id'] |
1136 | - val['tax_code_id'] = tax['tax_code_id'] |
1137 | - val['base_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['base'] * tax['base_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False) |
1138 | - val['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['amount'] * tax['tax_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False) |
1139 | - val['account_id'] = tax['account_collected_id'] or line.account_id.id |
1140 | - val['account_analytic_id'] = tax['account_analytic_collected_id'] |
1141 | - else: |
1142 | - val['base_code_id'] = tax['ref_base_code_id'] |
1143 | - val['tax_code_id'] = tax['ref_tax_code_id'] |
1144 | - val['base_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['base'] * tax['ref_base_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False) |
1145 | - val['tax_amount'] = cur_obj.compute(cr, uid, inv.currency_id.id, company_currency, val['amount'] * tax['ref_tax_sign'], context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')}, round=False) |
1146 | - val['account_id'] = tax['account_paid_id'] or line.account_id.id |
1147 | - val['account_analytic_id'] = tax['account_analytic_paid_id'] |
1148 | - |
1149 | + for tax in tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, (line.price_unit * (1-(line.discount or 0.0)/100.0)), \ |
1150 | + line.quantity, line.product_id, inv.partner_id, date=inv.date_invoice, apply_on=apply_on)['taxes']: |
1151 | + val={'invoice_id': inv.id, |
1152 | + 'name': tax['name'], |
1153 | + 'sequence': tax['sequence'], |
1154 | + 'amount': tax['amount'], |
1155 | + 'manual': False, |
1156 | + 'base': tax['price_unit'] * line['quantity'], |
1157 | + 'base_code_id': tax['code_type'] and tax['code_type'] == 'base' and tax['code_id'] or False, |
1158 | + 'tax_code_id': tax['code_type'] and tax['code_type'] == 'tax' and tax['code_id'] or False, |
1159 | + 'base_amount': 0, |
1160 | + 'tax_amount': 0, |
1161 | + 'account_id': tax['account_id'] or line.account_id.id, |
1162 | + 'account_analytic_id': tax['analytic_account_id']} |
1163 | + val['base_amount'] = tax['tax_amount'] >= 0 and val['base'] or -val['base'] |
1164 | + val['tax_amount'] = tax['tax_amount'] >= 0 and val['amount'] or -val['amount'] |
1165 | + if tax['code_type'] == 'base': |
1166 | + continue |
1167 | key = (val['tax_code_id'], val['base_code_id'], val['account_id'], val['account_analytic_id']) |
1168 | if not key in tax_grouped: |
1169 | tax_grouped[key] = val |
1170 | @@ -1746,7 +1746,6 @@ |
1171 | tax_grouped[key]['base'] += val['base'] |
1172 | tax_grouped[key]['base_amount'] += val['base_amount'] |
1173 | tax_grouped[key]['tax_amount'] += val['tax_amount'] |
1174 | - |
1175 | for t in tax_grouped.values(): |
1176 | t['base'] = cur_obj.round(cr, uid, cur, t['base']) |
1177 | t['amount'] = cur_obj.round(cr, uid, cur, t['amount']) |
1178 | |
1179 | === modified file 'account/account_move_line.py' |
1180 | --- account/account_move_line.py 2014-05-07 17:01:12 +0000 |
1181 | +++ account/account_move_line.py 2014-06-02 10:31:27 +0000 |
1182 | @@ -489,7 +489,7 @@ |
1183 | "this field will contain the basic amount(without tax)."), |
1184 | 'invoice': fields.function(_invoice, string='Invoice', |
1185 | type='many2one', relation='account.invoice', fnct_search=_invoice_search), |
1186 | - 'account_tax_id':fields.many2one('account.tax', 'Tax'), |
1187 | + 'account_tax_id': fields.many2one('account.tax', 'Tax'), |
1188 | 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account'), |
1189 | 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', |
1190 | string='Company', store=True, readonly=True) |
1191 | @@ -1231,27 +1231,17 @@ |
1192 | if vals.get('account_tax_id', False): |
1193 | tax_id = tax_obj.browse(cr, uid, vals['account_tax_id']) |
1194 | total = vals['debit'] - vals['credit'] |
1195 | - if journal.type in ('purchase_refund', 'sale_refund'): |
1196 | - base_code = 'ref_base_code_id' |
1197 | - tax_code = 'ref_tax_code_id' |
1198 | - account_id = 'account_paid_id' |
1199 | - base_sign = 'ref_base_sign' |
1200 | - tax_sign = 'ref_tax_sign' |
1201 | - else: |
1202 | - base_code = 'base_code_id' |
1203 | - tax_code = 'tax_code_id' |
1204 | - account_id = 'account_collected_id' |
1205 | - base_sign = 'base_sign' |
1206 | - tax_sign = 'tax_sign' |
1207 | tmp_cnt = 0 |
1208 | for tax in tax_obj.compute_all(cr, uid, [tax_id], total, 1.00, force_excluded=True).get('taxes'): |
1209 | + if tax['code_type'] == 'base': |
1210 | + continue |
1211 | #create the base movement |
1212 | if tmp_cnt == 0: |
1213 | - if tax[base_code]: |
1214 | + if tax['account_id']: |
1215 | tmp_cnt += 1 |
1216 | self.write(cr, uid,[result], { |
1217 | - 'tax_code_id': tax[base_code], |
1218 | - 'tax_amount': tax[base_sign] * abs(total) |
1219 | + 'tax_code_id': tax['code_id'], |
1220 | + 'tax_amount': tax['tax_amount'] >= 0 and abs(total) or -abs(total) |
1221 | }) |
1222 | else: |
1223 | data = { |
1224 | @@ -1261,8 +1251,8 @@ |
1225 | 'partner_id': vals.get('partner_id',False), |
1226 | 'ref': vals.get('ref',False), |
1227 | 'account_tax_id': False, |
1228 | - 'tax_code_id': tax[base_code], |
1229 | - 'tax_amount': tax[base_sign] * abs(total), |
1230 | + 'tax_code_id': tax['code_id'], |
1231 | + 'tax_amount': tax['tax_amount'] >= 0 and abs(total) or -abs(total), |
1232 | 'account_id': vals['account_id'], |
1233 | 'credit': 0.0, |
1234 | 'debit': 0.0, |
1235 | @@ -1277,9 +1267,9 @@ |
1236 | 'partner_id': vals.get('partner_id',False), |
1237 | 'ref': vals.get('ref',False), |
1238 | 'account_tax_id': False, |
1239 | - 'tax_code_id': tax[tax_code], |
1240 | - 'tax_amount': tax[tax_sign] * abs(tax['amount']), |
1241 | - 'account_id': tax[account_id] or vals['account_id'], |
1242 | + 'tax_code_id': tax['code_id'], |
1243 | + 'tax_amount': tax['tax_amount'] >= 0 and abs(total) or -abs(total), |
1244 | + 'account_id': tax['account_id'] or vals['account_id'], |
1245 | 'credit': tax['amount']<0 and -tax['amount'] or 0.0, |
1246 | 'debit': tax['amount']>0 and tax['amount'] or 0.0, |
1247 | } |
1248 | |
1249 | === modified file 'account/account_view.xml' |
1250 | --- account/account_view.xml 2014-05-02 13:07:53 +0000 |
1251 | +++ account/account_view.xml 2014-06-02 10:31:27 +0000 |
1252 | @@ -893,11 +893,9 @@ |
1253 | <search string="Search Taxes"> |
1254 | <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/> |
1255 | <field name="company_id" groups="base.group_multi_company"/> |
1256 | - <filter string="Sale" domain="[('type_tax_use','=','sale')]" /> |
1257 | - <filter string="Purchase" domain="[('type_tax_use','=','purchase')]" /> |
1258 | <group string="Group By..."> |
1259 | - <filter string="Company" domain="[]" context="{'group_by':'company_id'}"/> |
1260 | - <filter string="Tax Application" domain="[]" context="{'group_by':'type_tax_use'}"/> |
1261 | + <filter string="Parent" context="{'group_by':'parent_id'}"/> |
1262 | + <filter string="Company" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/> |
1263 | </group> |
1264 | </search> |
1265 | </field> |
1266 | @@ -910,83 +908,88 @@ |
1267 | <group> |
1268 | <group> |
1269 | <field name="name"/> |
1270 | - <field name="description"/> |
1271 | + <field name="description" attrs="{'invisible': [('type','in',('group'))]}"/> |
1272 | + <field name="type" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1273 | + <field name="price_include" attrs="{'invisible':[('type','in',('group','code'))], 'readonly':[('type','in',('percentage_price_include'))]}" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1274 | + <field name="active" groups="base.group_no_one"/> |
1275 | </group> |
1276 | <group> |
1277 | - <field name="type_tax_use"/> |
1278 | + <field name="type_tax_use" string="Domain" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1279 | <field name="company_id" widget="selection" groups="base.group_multi_company"/> |
1280 | - <field name="active"/> |
1281 | - </group> |
1282 | - </group> |
1283 | - <notebook> |
1284 | - <page string="Tax Definition"> |
1285 | - <group> |
1286 | - <group string="Tax Computation"> |
1287 | - <label for="type"/> |
1288 | - <div> |
1289 | - <field name="type"/> |
1290 | - <field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/> |
1291 | - </div> |
1292 | - <field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/> |
1293 | - <field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/> |
1294 | - <field name="price_include"/> |
1295 | - </group> |
1296 | - <group string="Misc"> |
1297 | - <field name="sequence"/> |
1298 | + <label for="amount" attrs="{'invisible': [('type','in',('group','code'))]}"/> |
1299 | + <div attrs="{'invisible': [('type','in',('group','code'))]}"> |
1300 | + <field name="amount" string="Tax Rate" class="oe_inline" nolabel="1" |
1301 | + on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1302 | + <span attrs="{'invisible': [('type','not in',('percent','percentage_price_include'))]}">%%</span> |
1303 | + </div> |
1304 | + <label for="include_base_amount"/> |
1305 | + <div> |
1306 | <field name="include_base_amount"/> |
1307 | - <field name="child_depend"/> |
1308 | - </group> |
1309 | - <group string="Invoices"> |
1310 | - <field name="account_collected_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/> |
1311 | - <field name="account_analytic_collected_id" domain="[('type','<>','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/> |
1312 | - |
1313 | - <field name="base_code_id"/> |
1314 | - <field name="base_sign"/> |
1315 | - <field name="tax_code_id"/> |
1316 | - <field name="tax_sign"/> |
1317 | - |
1318 | - </group> |
1319 | - <group string="Refunds"> |
1320 | - <field name="account_paid_id" domain="[('type','<>','view'),('type','<>','consolidation')]"/> |
1321 | - <field name="account_analytic_paid_id" domain="[('type','<>','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/> |
1322 | - |
1323 | - <field name="ref_base_code_id"/> |
1324 | - <field name="ref_base_sign"/> |
1325 | - <field name="ref_tax_code_id"/> |
1326 | - <field name="ref_tax_sign"/> |
1327 | - </group> |
1328 | - <group string="Children/Sub Taxes" colspan="2"> |
1329 | - <field name="child_depend" class="oe_inline"/> |
1330 | - <field name="child_ids" nolabel="1" colspan="2"> |
1331 | - <tree string="Account Tax"> |
1332 | - <field name="sequence"/> |
1333 | - <field name="name"/> |
1334 | - <field name="price_include"/> |
1335 | - <field name="description"/> |
1336 | - </tree> |
1337 | - </field> |
1338 | - </group> |
1339 | - </group> |
1340 | - </page> |
1341 | - <page string="Special Computation"> |
1342 | - <group col="4"> |
1343 | - <separator colspan="4" string="Applicability Options"/> |
1344 | - <field name="applicable_type"/> |
1345 | - <field name="domain"/> |
1346 | - <separator colspan="4" string="Applicable Code (if type=code)"/> |
1347 | - <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/> |
1348 | - </group> |
1349 | - </page> |
1350 | - </notebook> |
1351 | + </div> |
1352 | + <field name="parent_id" attrs="{'invisible': [('parent_id','=',False)]}" domain="[('type','=','group')]"/> |
1353 | + </group> |
1354 | + <group string="Misc" groups="base.group_no_one" attrs="{'invisible': [('type','=','group')]}"> |
1355 | + <field name="sequence"/> |
1356 | + <field name="applicable_type" groups="base.group_no_one"/> |
1357 | + <separator colspan="4" string="Applicable Code" attrs="{'invisible': [('applicable_type','!=','code')]}" groups="base.group_no_one"/> |
1358 | + <field colspan="4" name="python_applicable" nolabel="1" attrs="{'invisible': [('applicable_type','!=','code')], 'required':[('applicable_type','=','code')]}" groups="base.group_no_one"/> |
1359 | + </group> |
1360 | + <group string="Tax Computation By Python Code" attrs="{'invisible': [('type','!=','code')]}"> |
1361 | + <field name="python_compute" attrs="{'required':[('type','=','code')]}" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1362 | + </group> |
1363 | + </group> |
1364 | + <group name="child" attrs="{'invisible': [('type','!=','group')]}" string="Child Tax Account"> |
1365 | + <field name="child_ids" nolabel="1" widget="many2many_tags"/> |
1366 | + </group> |
1367 | + <div attrs="{'invisible': [('type','=','group')]}"> |
1368 | + <h2><label name="sale_excluded" string="Journal Items for a 100euros sale (taxes excluded)" attrs="{'invisible':['|', ('price_include','=',True), ('type_tax_use','in','purchase')]}"/></h2> |
1369 | + <h2><label name="sale_included" string="Journal Items for a 100euros sale (taxes included)" attrs="{'invisible':['|', ('price_include','=',False), ('type_tax_use','in','purchase')]}"/></h2> |
1370 | + <h2><label name="purchase_excluded" string="Journal Items for a 100euros purchase (taxes excluded)" attrs="{'invisible':['|', ('price_include','=',True), ('type_tax_use','not in','purchase')]}"/></h2> |
1371 | + <h2><label name="purchase_included" string="Journal Items for a 100euros purchase (taxes included)" attrs="{'invisible':['|', ('price_include','=',False), ('type_tax_use','not in','purchase')]}"/></h2> |
1372 | + <group colspan="7" name="invoice"> |
1373 | + <field name="tax_invoice_line_ids" context= "{'default_apply_on':'invoice'}" nolabel="1"> |
1374 | + <tree string="Tax Invoice Line" editable="bottom"> |
1375 | + <field name="sequence" widget="handle"/> |
1376 | + <field name="code_type"/> |
1377 | + <field name="description"/> |
1378 | + <field name="account_id" domain="[('type', '!=', 'view')]"/> |
1379 | + <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','in',('normal','contract'))]"/> |
1380 | + <field name="apply_on" invisible="1"/> |
1381 | + <field name="base_amount" attrs="{'invisible': [('code_type', '=', 'base')]}"/> |
1382 | + <field name="amount" on_change="onchange_amount(amount, context)"/> |
1383 | + <field name="tax_amount"/> |
1384 | + <field name="code_id"/> |
1385 | + </tree> |
1386 | + </field> |
1387 | + </group> |
1388 | + <h2><label name="refund_excluded" string="Journal Items for a 100euros refund (taxes excluded)" attrs="{'invisible':[('price_include','=',True)]}"/></h2> |
1389 | + <h2><label name="refund_included" string="Journal Items for a 100euros refund (taxes included)" attrs="{'invisible':[('price_include','=',False)]}"/></h2> |
1390 | + <group colspan="7" name="refund"> |
1391 | + <field name="tax_refund_line_ids" context= "{'default_apply_on':'refund'}" nolabel="1"> |
1392 | + <tree string="Tax Refund Line" editable="bottom"> |
1393 | + <field name="sequence" widget="handle"/> |
1394 | + <field name="code_type"/> |
1395 | + <field name="description"/> |
1396 | + <field name="account_id" domain="[('type', '!=', 'view')]"/> |
1397 | + <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','in',('normal','contract'))]"/> |
1398 | + <field name="apply_on" invisible="1"/> |
1399 | + <field name="base_amount" attrs="{'invisible': [('code_type', '=', 'base')]}"/> |
1400 | + <field name="amount" on_change="onchange_amount(amount, context)"/> |
1401 | + <field name="tax_amount"/> |
1402 | + <field name="code_id"/> |
1403 | + </tree> |
1404 | + </field> |
1405 | + </group> |
1406 | + </div> |
1407 | </form> |
1408 | - </field> |
1409 | + </field> |
1410 | </record> |
1411 | + |
1412 | <record id="action_tax_form" model="ir.actions.act_window"> |
1413 | <field name="name">Taxes</field> |
1414 | <field name="res_model">account.tax</field> |
1415 | <field name="view_type">form</field> |
1416 | <field name="view_id" ref="view_tax_tree"/> |
1417 | - <field name="domain">[('parent_id','=',False)]</field> |
1418 | </record> |
1419 | <menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/> |
1420 | |
1421 | @@ -1604,7 +1607,7 @@ |
1422 | <group> |
1423 | <group string="Amount Computation"> |
1424 | <field name="value"/> |
1425 | - <label for="value_amount" string="Amount To Pay" attrs="{'invisible':[('value','=','balance')]}"/> |
1426 | + <label for="value_amount" string="Amount To Pay" attrs="{'invisible': [('value','=','balance')]}"/> |
1427 | <div attrs="{'invisible':[('value','=','balance')]}"> |
1428 | <field name="value_amount" class="oe_inline"/> |
1429 | </div> |
1430 | @@ -1976,57 +1979,86 @@ |
1431 | <field name="model">account.tax.template</field> |
1432 | <field name="arch" type="xml"> |
1433 | <form string="Account Tax Template" version="7.0"> |
1434 | - <group col="4"> |
1435 | - <field name="name"/> |
1436 | - <field name="description"/> |
1437 | - <field name="chart_template_id"/> |
1438 | - <field name="type"/> |
1439 | - <field name="type_tax_use"/> |
1440 | - <field name="price_include"/> |
1441 | - </group> |
1442 | - <notebook> |
1443 | - <page string="Tax Definition"> |
1444 | - <group col="4"> |
1445 | - <field name="applicable_type"/> |
1446 | - <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/> |
1447 | + <group> |
1448 | + <group> |
1449 | + <field name="name"/> |
1450 | + <field name="chart_template_id"/> |
1451 | + <field name="description" attrs="{'invisible': [('type','in',('group'))]}"/> |
1452 | + <field name="type" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1453 | + <field name="price_include" attrs="{'invisible':[('type','in',('group','code'))], 'readonly':[('type','in',('percentage_price_include'))]}" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1454 | + <field name="active" groups="base.group_no_one"/> |
1455 | + </group> |
1456 | + <group> |
1457 | + <field name="type_tax_use" string="Domain" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1458 | + <label for="amount" attrs="{'invisible': [('type','in',('group','code'))]}"/> |
1459 | + <div attrs="{'invisible': [('type','in',('group','code'))]}"> |
1460 | + <field name="amount" string="Tax Rate" class="oe_inline" nolabel="1" |
1461 | + on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1462 | + <span attrs="{'invisible': [('type','not in',('percent','percentage_price_include'))]}">%%</span> |
1463 | + </div> |
1464 | + <label for="include_base_amount"/> |
1465 | + <div> |
1466 | <field name="include_base_amount"/> |
1467 | - <field name="domain"/> |
1468 | - <newline/> |
1469 | - <field name="account_collected_id"/> |
1470 | - <label colspan="2" string="Keep empty to use the income account"/> |
1471 | - <field name="account_paid_id"/> |
1472 | - <label colspan="2" string="Keep empty to use the expense account"/> |
1473 | - <field name="child_depend"/> |
1474 | - <field name="sequence"/> |
1475 | - </group> |
1476 | - </page> |
1477 | - <page string="Tax Declaration"> |
1478 | - <group col="4"> |
1479 | - <separator colspan="4" string="Invoices"/> |
1480 | - <field name="base_code_id"/> |
1481 | - <field name="base_sign"/> |
1482 | - <field name="tax_code_id"/> |
1483 | - <field name="tax_sign"/> |
1484 | - |
1485 | - <separator colspan="4" string="Credit Notes"/> |
1486 | - <field name="ref_base_code_id"/> |
1487 | - <field name="ref_base_sign"/> |
1488 | - <field name="ref_tax_code_id"/> |
1489 | - <field name="ref_tax_sign"/> |
1490 | - </group> |
1491 | - </page> |
1492 | - <page string="Special Computation"> |
1493 | - <separator string="Compute Code (if type=code)"/> |
1494 | - <field name="python_compute" attrs="{'readonly':[('type','!=','code')]}"/> |
1495 | - <separator string="Compute Code for Taxes Included Prices"/> |
1496 | - <field name="python_compute_inv"/> |
1497 | - <separator string="Applicable Code (if type=code)"/> |
1498 | - <field name="python_applicable" attrs="{'readonly':[('applicable_type','=','true')]}"/> |
1499 | - </page> |
1500 | - </notebook> |
1501 | + </div> |
1502 | + <field name="parent_id" attrs="{'invisible': [('parent_id','=',False)]}" domain="[('type','=','group')]"/> |
1503 | + </group> |
1504 | + <group string="Misc" groups="base.group_no_one" attrs="{'invisible': [('type','=','group')]}"> |
1505 | + <field name="sequence"/> |
1506 | + <field name="applicable_type" groups="base.group_no_one"/> |
1507 | + <separator colspan="4" string="Applicable Code" attrs="{'invisible': [('applicable_type','!=','code')]}" groups="base.group_no_one"/> |
1508 | + <field colspan="4" name="python_applicable" nolabel="1" attrs="{'invisible': [('applicable_type','!=','code')], 'required':[('applicable_type','=','code')]}" groups="base.group_no_one"/> |
1509 | + </group> |
1510 | + <group string="Tax Computation By Python Code" attrs="{'invisible': [('type','!=','code')]}"> |
1511 | + <field name="python_compute" attrs="{'required':[('type','=','code')]}" on_change="onchange_tax_id(type, amount, type_tax_use, python_compute, price_include, context)"/> |
1512 | + </group> |
1513 | + </group> |
1514 | + <group name="child" attrs="{'invisible': [('type','!=','group')]}" string="Child Tax Account"> |
1515 | + <field name="child_ids" nolabel="1" widget="many2many_tags"/> |
1516 | + </group> |
1517 | + <div attrs="{'invisible': [('type','=','group')]}"> |
1518 | + <h2><label name="sale_excluded" string="Journal Items for a 100euros sale (taxes excluded)" attrs="{'invisible':['|', ('price_include','=',True), ('type_tax_use','in','purchase')]}"/></h2> |
1519 | + <h2><label name="sale_included" string="Journal Items for a 100euros sale (taxes included)" attrs="{'invisible':['|', ('price_include','=',False), ('type_tax_use','in','purchase')]}"/></h2> |
1520 | + <h2><label name="purchase_excluded" string="Journal Items for a 100euros purchase (taxes excluded)" attrs="{'invisible':['|', ('price_include','=',True), ('type_tax_use','not in','purchase')]}"/></h2> |
1521 | + <h2><label name="purchase_included" string="Journal Items for a 100euros purchase (taxes included)" attrs="{'invisible':['|', ('price_include','=',False), ('type_tax_use','not in','purchase')]}"/></h2> |
1522 | + <group colspan="7" name="invoice"> |
1523 | + <field name="tax_invoice_line_ids" context= "{'default_apply_on':'invoice'}" nolabel="1"> |
1524 | + <tree string="Tax Invoice Line" editable="bottom"> |
1525 | + <field name="sequence" widget="handle"/> |
1526 | + <field name="code_type"/> |
1527 | + <field name="description"/> |
1528 | + <field name="account_id" domain="[('type', '!=', 'view')]"/> |
1529 | + <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','in',('normal','contract'))]"/> |
1530 | + <field name="apply_on" invisible="1"/> |
1531 | + <field name="base_amount" attrs="{'invisible': [('code_type', '=', 'base')]}"/> |
1532 | + <field name="amount" on_change="onchange_amount(amount, context)"/> |
1533 | + <field name="tax_amount"/> |
1534 | + <field name="code_id"/> |
1535 | + </tree> |
1536 | + </field> |
1537 | + </group> |
1538 | + <h2><label name="refund_excluded" string="Journal Items for a 100euros refund (taxes excluded)" attrs="{'invisible':[('price_include','=',True)]}"/></h2> |
1539 | + <h2><label name="refund_included" string="Journal Items for a 100euros refund (taxes included)" attrs="{'invisible':[('price_include','=',False)]}"/></h2> |
1540 | + <group colspan="7" name="refund"> |
1541 | + <field name="tax_refund_line_ids" context= "{'default_apply_on':'refund'}" nolabel="1"> |
1542 | + <tree string="Tax Refund Line" editable="bottom"> |
1543 | + <field name="sequence" widget="handle"/> |
1544 | + <field name="code_type"/> |
1545 | + <field name="description"/> |
1546 | + <field name="account_id" domain="[('type', '!=', 'view')]"/> |
1547 | + <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','in',('normal','contract'))]"/> |
1548 | + <field name="apply_on" invisible="1"/> |
1549 | + <field name="base_amount" attrs="{'invisible': [('code_type', '=', 'base')]}"/> |
1550 | + <field name="amount" on_change="onchange_amount(amount, context)"/> |
1551 | + <field name="tax_amount"/> |
1552 | + <field name="code_id"/> |
1553 | + </tree> |
1554 | + </field> |
1555 | + </group> |
1556 | + </div> |
1557 | </form> |
1558 | </field> |
1559 | </record> |
1560 | + |
1561 | <record id="view_account_tax_template_tree" model="ir.ui.view"> |
1562 | <field name="name">account.tax.template.tree</field> |
1563 | <field name="model">account.tax.template</field> |
1564 | |
1565 | === modified file 'account/data/configurable_account_chart.xml' |
1566 | --- account/data/configurable_account_chart.xml 2012-11-29 22:26:45 +0000 |
1567 | +++ account/data/configurable_account_chart.xml 2014-06-02 10:31:27 +0000 |
1568 | @@ -390,118 +390,372 @@ |
1569 | <record id="otaxs" model="account.tax.template"> |
1570 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1571 | <field name="name">OTAX S</field> |
1572 | - <field eval="0.15" name="amount"/> |
1573 | + <field eval="15" name="amount"/> |
1574 | <field name="type">percent</field> |
1575 | - <field name="account_collected_id" ref="conf_ova"/> |
1576 | - <field name="account_paid_id" ref="conf_ova"/> |
1577 | - <field name="base_code_id" ref="tax_code_purch_S"/> |
1578 | - <field name="tax_code_id" ref="tax_code_output_S"/> |
1579 | - <field name="ref_base_code_id" ref="tax_code_purch_S"/> |
1580 | - <field name="ref_tax_code_id" ref="tax_code_output_S"/> |
1581 | <field name="type_tax_use">purchase</field> |
1582 | </record> |
1583 | |
1584 | + <record id="otaxs_invoice_base_line" model="account.tax.line.template"> |
1585 | + <field name="code_type">base</field> |
1586 | + <field name="tax_amount">100</field> |
1587 | + <field name="amount">100</field> |
1588 | + <field name="apply_on">invoice</field> |
1589 | + <field name="code_id" ref="tax_code_purch_S"/> |
1590 | + <field name="tax_id" ref="otaxs"/> |
1591 | + </record> |
1592 | + |
1593 | + <record id="otaxs_invoice_tax_line" model="account.tax.line.template"> |
1594 | + <field name="code_type">tax</field> |
1595 | + <field name="tax_amount">15</field> |
1596 | + <field name="amount">15</field> |
1597 | + <field name="apply_on">invoice</field> |
1598 | + <field name="code_id" ref="tax_code_output_S"/> |
1599 | + <field name="account_id" ref="conf_ova"/> |
1600 | + <field name="tax_id" ref="otaxs"/> |
1601 | + </record> |
1602 | + |
1603 | + <record id="otaxs_refund_base_line" model="account.tax.line.template"> |
1604 | + <field name="code_type">base</field> |
1605 | + <field name="tax_amount">100</field> |
1606 | + <field name="amount">100</field> |
1607 | + <field name="apply_on">refund</field> |
1608 | + <field name="code_id" ref="tax_code_purch_S"/> |
1609 | + <field name="tax_id" ref="otaxs"/> |
1610 | + </record> |
1611 | + |
1612 | + <record id="otaxs_refund_tax_line" model="account.tax.line.template"> |
1613 | + <field name="code_type">tax</field> |
1614 | + <field name="tax_amount">15</field> |
1615 | + <field name="amount">15</field> |
1616 | + <field name="apply_on">refund</field> |
1617 | + <field name="code_id" ref="tax_code_output_S"/> |
1618 | + <field name="account_id" ref="conf_ova"/> |
1619 | + <field name="tax_id" ref="otaxs"/> |
1620 | + </record> |
1621 | + |
1622 | <record id="otaxr" model="account.tax.template"> |
1623 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1624 | <field name="name">OTAX R</field> |
1625 | - <field eval="0.05" name="amount"/> |
1626 | + <field eval="5" name="amount"/> |
1627 | <field name="type">percent</field> |
1628 | - <field name="account_collected_id" ref="conf_ova"/> |
1629 | - <field name="account_paid_id" ref="conf_ova"/> |
1630 | - <field name="base_code_id" ref="tax_code_purch_R"/> |
1631 | - <field name="tax_code_id" ref="tax_code_output_R"/> |
1632 | - <field name="ref_base_code_id" ref="tax_code_purch_R"/> |
1633 | - <field name="ref_tax_code_id" ref="tax_code_output_R"/> |
1634 | <field name="type_tax_use">purchase</field> |
1635 | </record> |
1636 | |
1637 | + <record id="otaxr_invoice_base_line" model="account.tax.line.template"> |
1638 | + <field name="code_type">base</field> |
1639 | + <field name="tax_amount">100</field> |
1640 | + <field name="amount">100</field> |
1641 | + <field name="apply_on">invoice</field> |
1642 | + <field name="code_id" ref="tax_code_purch_R"/> |
1643 | + <field name="tax_id" ref="otaxr"/> |
1644 | + </record> |
1645 | + |
1646 | + <record id="otaxr_invoice_tax_line" model="account.tax.line.template"> |
1647 | + <field name="code_type">tax</field> |
1648 | + <field name="tax_amount">5</field> |
1649 | + <field name="amount">5</field> |
1650 | + <field name="apply_on">invoice</field> |
1651 | + <field name="code_id" ref="tax_code_output_R"/> |
1652 | + <field name="account_id" ref="conf_ova"/> |
1653 | + <field name="tax_id" ref="otaxr"/> |
1654 | + </record> |
1655 | + |
1656 | + <record id="otaxr_refund_base_line" model="account.tax.line.template"> |
1657 | + <field name="code_type">base</field> |
1658 | + <field name="tax_amount">100</field> |
1659 | + <field name="amount">100</field> |
1660 | + <field name="apply_on">refund</field> |
1661 | + <field name="code_id" ref="tax_code_purch_R"/> |
1662 | + <field name="tax_id" ref="otaxr"/> |
1663 | + </record> |
1664 | + |
1665 | + <record id="otaxr_refund_tax_line" model="account.tax.line.template"> |
1666 | + <field name="code_type">tax</field> |
1667 | + <field name="tax_amount">5</field> |
1668 | + <field name="amount">5</field> |
1669 | + <field name="apply_on">refund</field> |
1670 | + <field name="code_id" ref="tax_code_output_R"/> |
1671 | + <field name="account_id" ref="conf_ova"/> |
1672 | + <field name="tax_id" ref="otaxr"/> |
1673 | + </record> |
1674 | + |
1675 | <record id="otaxx" model="account.tax.template"> |
1676 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1677 | <field name="name">OTAX X</field> |
1678 | - <field eval="0.0" name="amount"/> |
1679 | + <field eval="0" name="amount"/> |
1680 | <field name="type">percent</field> |
1681 | - <field name="account_collected_id" ref="conf_ova"/> |
1682 | - <field name="account_paid_id" ref="conf_ova"/> |
1683 | - <field name="base_code_id" ref="tax_code_purch_X"/> |
1684 | - <field name="tax_code_id" ref="tax_code_output_X"/> |
1685 | - <field name="ref_base_code_id" ref="tax_code_purch_X"/> |
1686 | - <field name="ref_tax_code_id" ref="tax_code_output_X"/> |
1687 | <field name="type_tax_use">purchase</field> |
1688 | </record> |
1689 | |
1690 | + <record id="otaxx_invoice_base_line" model="account.tax.line.template"> |
1691 | + <field name="code_type">base</field> |
1692 | + <field name="tax_amount">100</field> |
1693 | + <field name="amount">100</field> |
1694 | + <field name="apply_on">invoice</field> |
1695 | + <field name="code_id" ref="tax_code_purch_X"/> |
1696 | + <field name="tax_id" ref="otaxx"/> |
1697 | + </record> |
1698 | + |
1699 | + <record id="otaxx_invoice_tax_line" model="account.tax.line.template"> |
1700 | + <field name="code_type">tax</field> |
1701 | + <field name="tax_amount">0</field> |
1702 | + <field name="amount">0</field> |
1703 | + <field name="apply_on">invoice</field> |
1704 | + <field name="code_id" ref="tax_code_output_X"/> |
1705 | + <field name="account_id" ref="conf_ova"/> |
1706 | + <field name="tax_id" ref="otaxx"/> |
1707 | + </record> |
1708 | + |
1709 | + <record id="otaxx_refund_base_line" model="account.tax.line.template"> |
1710 | + <field name="code_type">base</field> |
1711 | + <field name="tax_amount">100</field> |
1712 | + <field name="amount">100</field> |
1713 | + <field name="apply_on">refund</field> |
1714 | + <field name="code_id" ref="tax_code_purch_X"/> |
1715 | + <field name="tax_id" ref="otaxx"/> |
1716 | + </record> |
1717 | + |
1718 | + <record id="otaxx_refund_tax_line" model="account.tax.line.template"> |
1719 | + <field name="code_type">tax</field> |
1720 | + <field name="tax_amount">0</field> |
1721 | + <field name="amount">0</field> |
1722 | + <field name="apply_on">refund</field> |
1723 | + <field name="code_id" ref="tax_code_output_X"/> |
1724 | + <field name="account_id" ref="conf_ova"/> |
1725 | + <field name="tax_id" ref="otaxx"/> |
1726 | + </record> |
1727 | + |
1728 | <record id="otaxo" model="account.tax.template"> |
1729 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1730 | <field name="name">OTAX O</field> |
1731 | - <field eval="0.0" name="amount"/> |
1732 | + <field eval="0" name="amount"/> |
1733 | <field name="type">percent</field> |
1734 | - <field name="account_collected_id" ref="conf_ova"/> |
1735 | - <field name="account_paid_id" ref="conf_ova"/> |
1736 | - <field name="base_code_id" ref="tax_code_purch_O"/> |
1737 | - <field name="tax_code_id" ref="tax_code_output_O"/> |
1738 | - <field name="ref_base_code_id" ref="tax_code_purch_O"/> |
1739 | - <field name="ref_tax_code_id" ref="tax_code_output_O"/> |
1740 | <field name="type_tax_use">purchase</field> |
1741 | </record> |
1742 | |
1743 | + <record id="otaxo_invoice_base_line" model="account.tax.line.template"> |
1744 | + <field name="code_type">base</field> |
1745 | + <field name="tax_amount">100</field> |
1746 | + <field name="amount">100</field> |
1747 | + <field name="apply_on">invoice</field> |
1748 | + <field name="code_id" ref="tax_code_purch_O"/> |
1749 | + <field name="tax_id" ref="otaxo"/> |
1750 | + </record> |
1751 | + |
1752 | + <record id="otaxo_invoice_tax_line" model="account.tax.line.template"> |
1753 | + <field name="code_type">tax</field> |
1754 | + <field name="tax_amount">0</field> |
1755 | + <field name="amount">0</field> |
1756 | + <field name="apply_on">invoice</field> |
1757 | + <field name="code_id" ref="tax_code_output_O"/> |
1758 | + <field name="account_id" ref="conf_ova"/> |
1759 | + <field name="tax_id" ref="otaxo"/> |
1760 | + </record> |
1761 | + |
1762 | + <record id="otaxo_refund_base_line" model="account.tax.line.template"> |
1763 | + <field name="code_type">base</field> |
1764 | + <field name="tax_amount">100</field> |
1765 | + <field name="amount">100</field> |
1766 | + <field name="apply_on">refund</field> |
1767 | + <field name="code_id" ref="tax_code_purch_O"/> |
1768 | + <field name="tax_id" ref="otaxo"/> |
1769 | + </record> |
1770 | + |
1771 | + <record id="otaxo_refund_tax_line" model="account.tax.line.template"> |
1772 | + <field name="code_type">tax</field> |
1773 | + <field name="tax_amount">0</field> |
1774 | + <field name="amount">0</field> |
1775 | + <field name="apply_on">refund</field> |
1776 | + <field name="code_id" ref="tax_code_output_O"/> |
1777 | + <field name="account_id" ref="conf_ova"/> |
1778 | + <field name="tax_id" ref="otaxo"/> |
1779 | + </record> |
1780 | + |
1781 | <!-- Sales + Input VAT --> |
1782 | |
1783 | <record id="itaxs" model="account.tax.template"> |
1784 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1785 | <field name="name">ITAX S</field> |
1786 | - <field eval="0.15" name="amount"/> |
1787 | + <field eval="15" name="amount"/> |
1788 | <field name="type">percent</field> |
1789 | - <field name="account_collected_id" ref="conf_iva"/> |
1790 | - <field name="account_paid_id" ref="conf_iva"/> |
1791 | - <field name="base_code_id" ref="tax_code_sales_S"/> |
1792 | - <field name="tax_code_id" ref="tax_code_input_S"/> |
1793 | - <field name="ref_base_code_id" ref="tax_code_sales_S"/> |
1794 | - <field name="ref_tax_code_id" ref="tax_code_input_S"/> |
1795 | <field name="type_tax_use">sale</field> |
1796 | </record> |
1797 | |
1798 | + <record id="itaxs_invoice_base_line" model="account.tax.line.template"> |
1799 | + <field name="code_type">base</field> |
1800 | + <field name="tax_amount">100</field> |
1801 | + <field name="amount">100</field> |
1802 | + <field name="apply_on">invoice</field> |
1803 | + <field name="code_id" ref="tax_code_sales_S"/> |
1804 | + <field name="tax_id" ref="itaxs"/> |
1805 | + </record> |
1806 | + |
1807 | + <record id="itaxs_invoice_tax_line" model="account.tax.line.template"> |
1808 | + <field name="code_type">tax</field> |
1809 | + <field name="tax_amount">15</field> |
1810 | + <field name="amount">15</field> |
1811 | + <field name="apply_on">invoice</field> |
1812 | + <field name="code_id" ref="tax_code_input_S"/> |
1813 | + <field name="account_id" ref="conf_iva"/> |
1814 | + <field name="tax_id" ref="itaxs"/> |
1815 | + </record> |
1816 | + |
1817 | + <record id="itaxs_refund_base_line" model="account.tax.line.template"> |
1818 | + <field name="code_type">base</field> |
1819 | + <field name="tax_amount">100</field> |
1820 | + <field name="amount">100</field> |
1821 | + <field name="apply_on">refund</field> |
1822 | + <field name="code_id" ref="tax_code_sales_S"/> |
1823 | + <field name="tax_id" ref="itaxs"/> |
1824 | + </record> |
1825 | + |
1826 | + <record id="itaxs_refund_tax_line" model="account.tax.line.template"> |
1827 | + <field name="code_type">tax</field> |
1828 | + <field name="tax_amount">15</field> |
1829 | + <field name="amount">15</field> |
1830 | + <field name="apply_on">refund</field> |
1831 | + <field name="code_id" ref="tax_code_input_S"/> |
1832 | + <field name="account_id" ref="conf_iva"/> |
1833 | + <field name="tax_id" ref="itaxs"/> |
1834 | + </record> |
1835 | + |
1836 | <record id="itaxr" model="account.tax.template"> |
1837 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1838 | <field name="name">ITAX R</field> |
1839 | - <field eval="0.05" name="amount"/> |
1840 | + <field eval="5" name="amount"/> |
1841 | <field name="type">percent</field> |
1842 | - <field name="account_collected_id" ref="conf_iva"/> |
1843 | - <field name="account_paid_id" ref="conf_iva"/> |
1844 | - <field name="base_code_id" ref="tax_code_sales_R"/> |
1845 | - <field name="tax_code_id" ref="tax_code_input_R"/> |
1846 | - <field name="ref_base_code_id" ref="tax_code_sales_R"/> |
1847 | - <field name="ref_tax_code_id" ref="tax_code_input_R"/> |
1848 | <field name="type_tax_use">sale</field> |
1849 | </record> |
1850 | |
1851 | + <record id="itaxr_invoice_base_line" model="account.tax.line.template"> |
1852 | + <field name="code_type">base</field> |
1853 | + <field name="tax_amount">100</field> |
1854 | + <field name="amount">100</field> |
1855 | + <field name="apply_on">invoice</field> |
1856 | + <field name="code_id" ref="tax_code_sales_R"/> |
1857 | + <field name="tax_id" ref="itaxr"/> |
1858 | + </record> |
1859 | + |
1860 | + <record id="itaxr_invoice_tax_line" model="account.tax.line.template"> |
1861 | + <field name="code_type">tax</field> |
1862 | + <field name="tax_amount">5</field> |
1863 | + <field name="amount">5</field> |
1864 | + <field name="apply_on">invoice</field> |
1865 | + <field name="code_id" ref="tax_code_input_R"/> |
1866 | + <field name="account_id" ref="conf_iva"/> |
1867 | + <field name="tax_id" ref="itaxr"/> |
1868 | + </record> |
1869 | + |
1870 | + <record id="itaxr_refund_base_line" model="account.tax.line.template"> |
1871 | + <field name="code_type">base</field> |
1872 | + <field name="tax_amount">100</field> |
1873 | + <field name="amount">100</field> |
1874 | + <field name="apply_on">refund</field> |
1875 | + <field name="code_id" ref="tax_code_sales_R"/> |
1876 | + <field name="tax_id" ref="itaxr"/> |
1877 | + </record> |
1878 | + |
1879 | + <record id="itaxr_refund_tax_line" model="account.tax.line.template"> |
1880 | + <field name="code_type">tax</field> |
1881 | + <field name="tax_amount">5</field> |
1882 | + <field name="amount">5</field> |
1883 | + <field name="apply_on">refund</field> |
1884 | + <field name="code_id" ref="tax_code_input_R"/> |
1885 | + <field name="account_id" ref="conf_iva"/> |
1886 | + <field name="tax_id" ref="itaxr"/> |
1887 | + </record> |
1888 | + |
1889 | <record id="itaxx" model="account.tax.template"> |
1890 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1891 | <field name="name">ITAX X</field> |
1892 | <field eval="0.0" name="amount"/> |
1893 | <field name="type">percent</field> |
1894 | - <field name="account_collected_id" ref="conf_iva"/> |
1895 | - <field name="account_paid_id" ref="conf_iva"/> |
1896 | - <field name="base_code_id" ref="tax_code_sales_X"/> |
1897 | - <field name="tax_code_id" ref="tax_code_input_X"/> |
1898 | - <field name="ref_base_code_id" ref="tax_code_sales_X"/> |
1899 | - <field name="ref_tax_code_id" ref="tax_code_input_X"/> |
1900 | <field name="type_tax_use">sale</field> |
1901 | </record> |
1902 | |
1903 | + <record id="itaxx_invoice_base_line" model="account.tax.line.template"> |
1904 | + <field name="code_type">base</field> |
1905 | + <field name="tax_amount">100</field> |
1906 | + <field name="amount">100</field> |
1907 | + <field name="apply_on">invoice</field> |
1908 | + <field name="code_id" ref="tax_code_sales_X"/> |
1909 | + <field name="tax_id" ref="itaxx"/> |
1910 | + </record> |
1911 | + |
1912 | + <record id="itaxx_invoice_tax_line" model="account.tax.line.template"> |
1913 | + <field name="code_type">tax</field> |
1914 | + <field name="tax_amount">0</field> |
1915 | + <field name="amount">0</field> |
1916 | + <field name="apply_on">invoice</field> |
1917 | + <field name="code_id" ref="tax_code_input_X"/> |
1918 | + <field name="account_id" ref="conf_iva"/> |
1919 | + <field name="tax_id" ref="itaxx"/> |
1920 | + </record> |
1921 | + |
1922 | + <record id="itaxx_refund_base_line" model="account.tax.line.template"> |
1923 | + <field name="code_type">base</field> |
1924 | + <field name="tax_amount">100</field> |
1925 | + <field name="amount">100</field> |
1926 | + <field name="apply_on">refund</field> |
1927 | + <field name="code_id" ref="tax_code_sales_X"/> |
1928 | + <field name="tax_id" ref="itaxx"/> |
1929 | + </record> |
1930 | + |
1931 | + <record id="itaxx_refund_tax_line" model="account.tax.line.template"> |
1932 | + <field name="code_type">tax</field> |
1933 | + <field name="tax_amount">0</field> |
1934 | + <field name="amount">0</field> |
1935 | + <field name="apply_on">refund</field> |
1936 | + <field name="code_id" ref="tax_code_input_X"/> |
1937 | + <field name="account_id" ref="conf_iva"/> |
1938 | + <field name="tax_id" ref="itaxx"/> |
1939 | + </record> |
1940 | + |
1941 | <record id="itaxo" model="account.tax.template"> |
1942 | <field name="chart_template_id" ref="configurable_chart_template"/> |
1943 | <field name="name">ITAX O</field> |
1944 | <field eval="0.0" name="amount"/> |
1945 | <field name="type">percent</field> |
1946 | - <field name="account_collected_id" ref="conf_iva"/> |
1947 | - <field name="account_paid_id" ref="conf_iva"/> |
1948 | - <field name="base_code_id" ref="tax_code_sales_O"/> |
1949 | - <field name="tax_code_id" ref="tax_code_input_O"/> |
1950 | - <field name="ref_base_code_id" ref="tax_code_sales_O"/> |
1951 | - <field name="ref_tax_code_id" ref="tax_code_input_O"/> |
1952 | <field name="type_tax_use">sale</field> |
1953 | </record> |
1954 | |
1955 | - |
1956 | + <record id="itaxo_invoice_base_line" model="account.tax.line.template"> |
1957 | + <field name="code_type">base</field> |
1958 | + <field name="tax_amount">100</field> |
1959 | + <field name="amount">100</field> |
1960 | + <field name="apply_on">invoice</field> |
1961 | + <field name="code_id" ref="tax_code_sales_O"/> |
1962 | + <field name="tax_id" ref="itaxo"/> |
1963 | + </record> |
1964 | + |
1965 | + <record id="itaxo_invoice_tax_line" model="account.tax.line.template"> |
1966 | + <field name="code_type">tax</field> |
1967 | + <field name="tax_amount">0</field> |
1968 | + <field name="amount">0</field> |
1969 | + <field name="apply_on">invoice</field> |
1970 | + <field name="code_id" ref="tax_code_input_O"/> |
1971 | + <field name="account_id" ref="conf_iva"/> |
1972 | + <field name="tax_id" ref="itaxo"/> |
1973 | + </record> |
1974 | + |
1975 | + <record id="itaxo_refund_base_line" model="account.tax.line.template"> |
1976 | + <field name="code_type">base</field> |
1977 | + <field name="tax_amount">100</field> |
1978 | + <field name="amount">100</field> |
1979 | + <field name="apply_on">refund</field> |
1980 | + <field name="code_id" ref="tax_code_sales_O"/> |
1981 | + <field name="tax_id" ref="itaxo"/> |
1982 | + </record> |
1983 | + |
1984 | + <record id="itaxo_refund_tax_line" model="account.tax.line.template"> |
1985 | + <field name="code_type">tax</field> |
1986 | + <field name="tax_amount">0</field> |
1987 | + <field name="amount">0</field> |
1988 | + <field name="apply_on">refund</field> |
1989 | + <field name="code_id" ref="tax_code_input_O"/> |
1990 | + <field name="account_id" ref="conf_iva"/> |
1991 | + <field name="tax_id" ref="itaxo"/> |
1992 | + </record> |
1993 | |
1994 | <!-- = = = = = = = = = = = = = = = --> |
1995 | <!-- Fiscal Mapping Templates --> |
1996 | |
1997 | === modified file 'account/product.py' |
1998 | --- account/product.py 2013-11-29 16:56:44 +0000 |
1999 | +++ account/product.py 2014-06-02 10:31:27 +0000 |
2000 | @@ -45,7 +45,7 @@ |
2001 | _columns = { |
2002 | 'taxes_id': fields.many2many('account.tax', 'product_taxes_rel', |
2003 | 'prod_id', 'tax_id', 'Customer Taxes', |
2004 | - domain=[('parent_id','=',False),('type_tax_use','in',['sale','all'])]), |
2005 | + domain=[('parent_id','=',False),('type_tax_use','in',['sale','all'])]), |
2006 | 'supplier_taxes_id': fields.many2many('account.tax', |
2007 | 'product_supplier_taxes_rel', 'prod_id', 'tax_id', |
2008 | 'Supplier Taxes', domain=[('parent_id', '=', False),('type_tax_use','in',['purchase','all'])]), |
2009 | |
2010 | === modified file 'account/security/ir.model.access.csv' |
2011 | --- account/security/ir.model.access.csv 2013-10-27 12:31:04 +0000 |
2012 | +++ account/security/ir.model.access.csv 2014-06-02 10:31:27 +0000 |
2013 | @@ -4,12 +4,14 @@ |
2014 | access_account_payment_term_line,account.payment.term.line,model_account_payment_term_line,account.group_account_user,1,0,0,0 |
2015 | access_account_account_type,account.account.type,model_account_account_type,account.group_account_user,1,0,0,0 |
2016 | access_account_tax_internal_user,account.tax internal user,model_account_tax,base.group_user,1,0,0,0 |
2017 | +access_account_tax_line_internal_user,account.tax.line internal user,model_account_tax_line,base.group_user,1,0,0,0 |
2018 | access_account_account,account.account,model_account_account,account.group_account_user,1,0,0,0 |
2019 | access_account_account_user,account.account user,model_account_account,base.group_user,1,0,0,0 |
2020 | access_account_account_partner_manager,account.account partner manager,model_account_account,base.group_partner_manager,1,0,0,0 |
2021 | access_account_journal_period_manager,account.journal.period manager,model_account_journal_period,account.group_account_manager,1,0,0,0 |
2022 | access_account_tax_code,account.tax.code,model_account_tax_code,account.group_account_invoice,1,0,0,0 |
2023 | access_account_tax,account.tax,model_account_tax,account.group_account_invoice,1,0,0,0 |
2024 | +access_account_tax_line_internal_user,account.tax.line,model_account_tax_line,account.group_account_invoice,1,0,0,0 |
2025 | access_account_model,account.model,model_account_model,account.group_account_user,1,1,1,1 |
2026 | access_account_model_line,account.model.line,model_account_model_line,account.group_account_user,1,1,1,1 |
2027 | access_account_subscription,account.subscription,model_account_subscription,account.group_account_user,1,1,1,1 |
2028 | @@ -36,6 +38,7 @@ |
2029 | access_account_payment_term_manager,account.payment.term,model_account_payment_term,account.group_account_manager,1,1,1,1 |
2030 | access_account_payment_term_line_manager,account.payment.term.line,model_account_payment_term_line,account.group_account_manager,1,1,1,1 |
2031 | access_account_tax_manager,account.tax,model_account_tax,account.group_account_manager,1,1,1,1 |
2032 | +access_account_tax_line_manager,account.tax.line,model_account_tax_line,account.group_account_manager,1,1,1,1 |
2033 | access_account_journal_manager,account.journal,model_account_journal,account.group_account_manager,1,1,1,1 |
2034 | access_account_journal_invoice,account.journal invoice,model_account_journal,account.group_account_invoice,1,0,0,0 |
2035 | access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1 |
2036 | @@ -91,6 +94,7 @@ |
2037 | access_report_account_receivable_invoice,report.account.receivable.invoice,model_report_account_receivable,account.group_account_invoice,1,1,1,1 |
2038 | access_account_sequence_fiscal_year_invoice,account.sequence.fiscalyear invoice,model_account_sequence_fiscalyear,account.group_account_invoice,1,1,1,1 |
2039 | access_account_tax_sale_manager,account.tax sale manager,model_account_tax,base.group_sale_salesman,1,0,0,0 |
2040 | +access_account_tax_line_sale_manager,account.tax.line sale manager,model_account_tax_line,base.group_sale_salesman,1,0,0,0 |
2041 | access_account_journal_sale_manager,account.journal sale manager,model_account_journal,base.group_sale_salesman,1,0,0,0 |
2042 | access_account_invoice_tax_sale_manager,account.invoice.tax sale manager,model_account_invoice_tax,base.group_sale_salesman,1,0,0,0 |
2043 | access_account_sequence_fiscal_year_sale_user,account.sequence.fiscalyear.sale.user,model_account_sequence_fiscalyear,base.group_sale_salesman,1,1,1,0 |
2044 | |
2045 | === modified file 'account/test/account_customer_invoice.yml' |
2046 | --- account/test/account_customer_invoice.yml 2013-10-27 12:31:04 +0000 |
2047 | +++ account/test/account_customer_invoice.yml 2014-06-02 10:31:27 +0000 |
2048 | @@ -33,6 +33,11 @@ |
2049 | - product_id: product.product_product_5 |
2050 | quantity: 10.0 |
2051 | - |
2052 | + compute |
2053 | +- |
2054 | + !python {model: account.invoice}: | |
2055 | + self.button_compute(cr, uid, [ref('account_invoice_customer0')]) |
2056 | +- |
2057 | I manually assign tax on invoice |
2058 | - |
2059 | !python {model: account.invoice.tax}: | |
2060 | |
2061 | === modified file 'account/test/account_supplier_invoice.yml' |
2062 | --- account/test/account_supplier_invoice.yml 2013-10-27 12:31:04 +0000 |
2063 | +++ account/test/account_supplier_invoice.yml 2014-06-02 10:31:27 +0000 |
2064 | @@ -22,7 +22,13 @@ |
2065 | sequence: 1 |
2066 | company_id: base.main_company |
2067 | type_tax_use: all |
2068 | - tax_code_id: tax_case |
2069 | + tax_invoice_line_ids: |
2070 | + - code_type: base |
2071 | + amount: 100 |
2072 | + - code_type: tax |
2073 | + amount: 10 |
2074 | + code_id: tax_case |
2075 | + account_id: account.ova |
2076 | - |
2077 | I create a supplier invoice |
2078 | - |
2079 | @@ -45,6 +51,11 @@ |
2080 | reference_type: none |
2081 | type: in_invoice |
2082 | - |
2083 | + I compute a supplier Invoice |
2084 | +- |
2085 | + !python {model: account.invoice}: | |
2086 | + self.button_compute(cr, uid, [ref('account_invoice_supplier0')]) |
2087 | +- |
2088 | I check that Initially supplier invoice state is "Draft" |
2089 | - |
2090 | !assert {model: account.invoice, id: account_invoice_supplier0}: |
2091 | |
2092 | === added file 'account/test/account_tax_cal.yml' |
2093 | --- account/test/account_tax_cal.yml 1970-01-01 00:00:00 +0000 |
2094 | +++ account/test/account_tax_cal.yml 2014-06-02 10:31:27 +0000 |
2095 | @@ -0,0 +1,247 @@ |
2096 | +- |
2097 | + In order to test account tax I create a new base line and tax lines |
2098 | +- |
2099 | + I create a Tax |
2100 | +- |
2101 | + !record {model: account.tax, id: vat_12}: |
2102 | + name: VAT-12% |
2103 | + amount: 12 |
2104 | + type: percent |
2105 | + tax_invoice_line_ids: |
2106 | + - code_type: base |
2107 | + amount: 100 |
2108 | + - code_type: tax #vat |
2109 | + amount: 12 |
2110 | + account_id: account.ova |
2111 | + - code_type: tax #cess2 |
2112 | + amount: 0.24 |
2113 | + account_id: account.ova |
2114 | + - code_type: tax #high education cess1 |
2115 | + amount: 0.12 |
2116 | + account_id: account.ova |
2117 | +- |
2118 | + I compute a tax |
2119 | +- |
2120 | + !python {model: account.tax}: | |
2121 | + taxes = self.browse(cr, uid, [ref('vat_12')]) |
2122 | + res = self.compute_all(cr, uid, taxes, 1000, 3) |
2123 | + taxes = res['taxes'] |
2124 | + |
2125 | + assert res['total'] == 3000, 'Incorrect amount on which tax applied.' |
2126 | + assert res['total_included'] == 3370.7999999999997, 'Incorrect total amount(with Tax amount).' |
2127 | + |
2128 | + assert taxes[0]['price_unit'] == 1000, 'Incorrect unit Price.' |
2129 | + assert taxes[0]['amount'] == 3000, 'Incorrect base amount.' |
2130 | + assert taxes[0]['code_type'] == 'base', 'Incorrect code type.' |
2131 | + |
2132 | + assert taxes[1]['price_unit'] == 1000.0, 'Incorrect unit Price.' |
2133 | + assert taxes[1]['amount'] == 360.0, 'Incorrect calculated tax amount.' |
2134 | + assert taxes[1]['code_type'] == 'tax', 'Incorrect code type.' |
2135 | + |
2136 | + assert taxes[2]['price_unit'] == 1000.0, 'Incorrect unit Price.' |
2137 | + assert taxes[2]['amount'] == 7.2, 'Incorrect calculated amount for cess2 tax.' |
2138 | + assert taxes[2]['code_type'] == 'tax', 'Incorrect code type.' |
2139 | + |
2140 | + assert taxes[3]['price_unit'] == 1000.0, 'Incorrect unit Price.' |
2141 | + assert taxes[3]['amount'] == 3.6, 'Incorrect calculated amount for high education cess1 tax.' |
2142 | + assert taxes[3]['code_type'] == 'tax', 'Incorrect code type.' |
2143 | +- |
2144 | + In order to test account tax with Price Include I create a new base line and tax line |
2145 | +- |
2146 | + I create a Tax with price include |
2147 | +- |
2148 | + !record {model: account.tax, id: priceinclude}: |
2149 | + name: Price Include |
2150 | + amount: 10 |
2151 | + type: percent |
2152 | + price_include: 1 |
2153 | +- |
2154 | + I compute a tax. |
2155 | +- |
2156 | + !python {model: account.tax}: | |
2157 | + taxes = self.browse(cr, uid, [ref('priceinclude')]) |
2158 | + res = self.compute_all(cr, uid, taxes, 1000, 1) |
2159 | + taxes = res['taxes'] |
2160 | + |
2161 | + assert res['total'] == 910, 'Incorrect amount on which tax applied.' |
2162 | + assert res['total_included'] == 1000, 'Incorrect total amount(with Tax amount).' |
2163 | + |
2164 | + assert taxes[0]['price_unit'] == 910, 'Incorrect unit Price.' |
2165 | + assert taxes[0]['amount'] == 1000, 'Incorrect base amount.' |
2166 | + assert taxes[0]['code_type'] == 'base', 'Incorrect code type.' |
2167 | + |
2168 | + assert taxes[1]['price_unit'] == 910, 'Incorrect unit Price.' |
2169 | + assert taxes[1]['amount'] == 90, 'Incorrect tax amount.' |
2170 | + assert taxes[1]['code_type'] == 'tax', 'Incorrect code type.' |
2171 | +- |
2172 | + In order to test account tax with Include Base I create a new base line and tax lines |
2173 | +- |
2174 | + I create a Tax with include base |
2175 | +- |
2176 | + !record {model: account.tax, id: vat_4_group}: |
2177 | + name: vat 4 group |
2178 | + type: group |
2179 | +- |
2180 | + !record {model: account.tax, id: vat12}: |
2181 | + name: vat 12 |
2182 | + amount: 12 |
2183 | + type: percent |
2184 | + parent_id: vat_4_group |
2185 | +- |
2186 | + !record {model: account.tax, id: vat_4_cess_2}: |
2187 | + name: Education cess |
2188 | + amount: 2 |
2189 | + type: percent |
2190 | + include_base_amount: 1 |
2191 | + parent_id: vat_4_group |
2192 | +- |
2193 | + !record {model: account.tax, id: vat_4_cess_1}: |
2194 | + name: Higher Education cess |
2195 | + amount: 1 |
2196 | + type: percent |
2197 | + include_base_amount: 1 |
2198 | + parent_id: vat_4_group |
2199 | +- |
2200 | + I compute a tax |
2201 | +- |
2202 | + !python {model: account.tax}: | |
2203 | + taxes = self.browse(cr, uid, [ref('vat_4_group')]) |
2204 | + res = self.compute_all(cr, uid, taxes, 1000, 3) |
2205 | + taxes = res['taxes'] |
2206 | + |
2207 | + assert res['total'] == 3000, 'Incorrect amount on which tax applied.' |
2208 | + assert res['total_included'] == 3450.6, 'Incorrect total amount(with Tax amount).' |
2209 | + |
2210 | + assert taxes[0]['price_unit'] == 1000, 'Incorrect unit Price for vat 12.' |
2211 | + assert taxes[0]['amount'] == 3000, 'Incorrect base amount for vat 12.' |
2212 | + assert taxes[0]['code_type'] == 'base', 'Incorrect code type for vat 12.' |
2213 | + |
2214 | + assert taxes[1]['price_unit'] == 1000, 'Incorrect unit Price for vat 12.' |
2215 | + assert taxes[1]['amount'] == 360, 'Incorrect tax amount for vat 12.' |
2216 | + assert taxes[1]['code_type'] == 'tax', 'Incorrect code type for vat 12.' |
2217 | + |
2218 | + assert taxes[2]['price_unit'] == 1000, 'Incorrect unit Price for Education cess tax.' |
2219 | + assert taxes[2]['amount'] == 3000, 'Incorrect base amount for Education cess tax.' |
2220 | + assert taxes[2]['code_type'] == 'base', 'Incorrect code type for Education cess tax.' |
2221 | + |
2222 | + assert taxes[3]['price_unit'] == 1000, 'Incorrect unit Price for Education cess tax.' |
2223 | + assert taxes[3]['amount'] == 60, 'Incorrect tax amount for Education cess tax.' |
2224 | + assert taxes[3]['code_type'] == 'tax', 'Incorrect code type for Education cess tax.' |
2225 | + |
2226 | + assert taxes[4]['price_unit'] == 1020, 'Incorrect unit Price for Higher Education cess tax.' |
2227 | + assert taxes[4]['amount'] == 3060, 'Incorrect base amount for Higher Education cess tax.' |
2228 | + assert taxes[4]['code_type'] == 'base', 'Incorrect code type for Higher Education cess tax.' |
2229 | + |
2230 | + assert taxes[5]['price_unit'] == 1020, 'Incorrect unit Price for Higher Education cess tax.' |
2231 | + assert taxes[5]['amount'] == 30.6, 'Incorrect tax amount for Higher Education cess tax.' |
2232 | + assert taxes[5]['code_type'] == 'tax', 'Incorrect code type for Higher Education cess tax.' |
2233 | + |
2234 | +- |
2235 | + In order to test account tax with Python Code I create a new base line and tax line |
2236 | +- |
2237 | + I create a Tax |
2238 | +- |
2239 | + !record {model: account.tax, id: code_tax}: |
2240 | + name: Code Tax |
2241 | + type: code |
2242 | + python_compute: '100 * 0.10' |
2243 | + tax_invoice_line_ids: |
2244 | + - code_type: base |
2245 | + amount: 100 |
2246 | + - code_type: tax |
2247 | + amount: 10 |
2248 | +- |
2249 | + I compute a tax |
2250 | +- |
2251 | + !python {model: account.tax}: | |
2252 | + taxes = self.browse(cr, uid, [ref('code_tax')]) |
2253 | + res = self.compute_all(cr, uid, taxes, 1000, 1) |
2254 | + taxes = res['taxes'] |
2255 | + |
2256 | + assert res['total'] == 1000, 'Incorrect amount on which tax applied.' |
2257 | + assert res['total_included'] == 1100, 'Incorrect total amount(with Tax amount).' |
2258 | + |
2259 | + assert taxes[0]['price_unit'] == 1000, 'Incorrect unit Price.' |
2260 | + assert taxes[0]['amount'] == 1000, 'Incorrect base amount.' |
2261 | + assert taxes[0]['code_type'] == 'base', 'Incorrect code type.' |
2262 | + |
2263 | + assert taxes[1]['price_unit'] == 1000, 'Incorrect unit Price.' |
2264 | + assert taxes[1]['amount'] == 100, 'Incorrect tax amount.' |
2265 | + assert taxes[1]['code_type'] == 'tax', 'Incorrect code type.' |
2266 | + |
2267 | +- |
2268 | + In order to test account invoice I create a new supplier invoice |
2269 | +- |
2270 | + I create a Tax with Base code and Tax code |
2271 | +- |
2272 | + !record {model: account.tax.code, id: tax_10_base_code}: |
2273 | + name: Tax 10 Base Code |
2274 | +- |
2275 | + !record {model: account.tax.code, id: tax_10_tax_code}: |
2276 | + name: TAX 10 Tax Code |
2277 | +- |
2278 | + !record {model: account.tax, id: invtax}: |
2279 | + name: Tax10.0 |
2280 | + amount: 10.0 |
2281 | + type: percent |
2282 | + type_tax_use: all |
2283 | + tax_invoice_line_ids: |
2284 | + - code_type: base |
2285 | + amount: 100.0 |
2286 | + code_id: tax_10_base_code |
2287 | + - code_type: tax |
2288 | + amount: 10.0 |
2289 | + code_id: tax_10_tax_code |
2290 | +- |
2291 | + I create a supplier invoice |
2292 | +- |
2293 | + !record {model: account.invoice, id: account_invoice_supplier1, view: invoice_supplier_form}: |
2294 | + account_id: account.a_pay |
2295 | + check_total: 3300.0 |
2296 | + currency_id: base.EUR |
2297 | + invoice_line: |
2298 | + - account_id: account.a_expense |
2299 | + name: '[PCSC234] PC Assemble SC234' |
2300 | + price_unit: 300.0 |
2301 | + product_id: product.product_product_3 |
2302 | + quantity: 10.0 |
2303 | + uos_id: product.product_uom_unit |
2304 | + invoice_line_tax_id: |
2305 | + - invtax |
2306 | + journal_id: account.expenses_journal |
2307 | + partner_id: base.res_partner_12 |
2308 | + reference_type: none |
2309 | + type: in_invoice |
2310 | +- |
2311 | + I compute a supplier Invoice |
2312 | +- |
2313 | + !python {model: account.invoice}: | |
2314 | + self.button_compute(cr, uid, [ref('account_invoice_supplier1')]) |
2315 | +- |
2316 | + I check that account invoice tax line |
2317 | +- |
2318 | + !python {model: account.invoice}: | |
2319 | + inv = self.browse(cr, uid, ref('account_invoice_supplier1')) |
2320 | + taxline = inv.tax_line |
2321 | + assert taxline[0].amount == 300, "Tax amount is wrong" |
2322 | + assert taxline[0].base == 3000, "Base amount is wrong" |
2323 | +- |
2324 | + I Validate the invoice and make state of invoice to open |
2325 | +- |
2326 | + !workflow {model: account.invoice, action: invoice_open, ref: account_invoice_supplier1} |
2327 | +- |
2328 | + I check that the invoice state is now "Open" |
2329 | +- |
2330 | + !assert {model: account.invoice, id: account_invoice_supplier1}: |
2331 | + - state == 'open' |
2332 | +- |
2333 | + I check that account move lines |
2334 | +- |
2335 | + !python {model: account.invoice}: | |
2336 | + inv = self.browse(cr, uid, ref('account_invoice_supplier1')) |
2337 | + move_line = inv.move_id.line_id |
2338 | + assert (move_line[0].debit == 3300.0 and move_line[0].credit == 0.0 and move_line[0].tax_amount == 0.0), "Incorrect Debit, Credit or Amount" |
2339 | + assert (move_line[1].debit == 0.0 and move_line[1].credit == 300.0 and move_line[1].tax_amount == 300.0), "Incorrect Debit, Credit or Amount" |
2340 | + assert (move_line[1].tax_code_id.id == ref('tax_10_tax_code')), "Incorrect Tax Account" |
2341 | + assert (move_line[2].debit == 0.0 and move_line[2].credit == 3000.0 and move_line[2].tax_amount == 3000.0), "Incorrect Debit, Credit or Amount" |
2342 | + assert (move_line[2].tax_code_id.id == ref('tax_10_base_code')), "Incorrect Tax Account" |
2343 | |
2344 | === modified file 'account/test/account_validate_account_move.yml' |
2345 | --- account/test/account_validate_account_move.yml 2013-10-27 12:31:04 +0000 |
2346 | +++ account/test/account_validate_account_move.yml 2014-06-02 10:31:27 +0000 |
2347 | @@ -36,15 +36,14 @@ |
2348 | !python {model: account.move.line}: | |
2349 | import time |
2350 | date = self._get_date(cr, uid, { |
2351 | - 'journal_id': 1, |
2352 | - 'period_id': 6,}) |
2353 | + 'journal_id': ref('account.bank_journal'), |
2354 | + 'period_id': ref('account.period_6'),}) |
2355 | partner = self.onchange_partner_id(cr, uid, [], False, ref('base.res_partner_12'), ref('account.cash'), debit=0, credit=2000, date=date, journal=False) |
2356 | account = self.onchange_account_id(cr, uid, [], account_id=ref('account.a_recv'), partner_id= ref('base.res_partner_12')) |
2357 | vals = { |
2358 | 'journal_id': ref('account.bank_journal'), |
2359 | 'period_id': ref('account.period_6'), |
2360 | 'ref': '2011010', |
2361 | - 'tax_code_id': ref('account_tax_code_0'), |
2362 | 'tax_amount': 0.0, |
2363 | 'account_id': ref('account.a_recv'), |
2364 | 'amount_currency': 0.0, |
2365 | |
2366 | === modified file 'account/test/test_edi_invoice.yml' |
2367 | --- account/test/test_edi_invoice.yml 2012-11-29 22:26:45 +0000 |
2368 | +++ account/test/test_edi_invoice.yml 2014-06-02 10:31:27 +0000 |
2369 | @@ -4,7 +4,7 @@ |
2370 | First I create a draft customer invoice |
2371 | - |
2372 | !record {model: account.invoice, id: invoice_edi_1}: |
2373 | - journal_id: 1 |
2374 | + journal_id: account.bank_journal |
2375 | partner_id: base.res_partner_2 |
2376 | currency_id: base.EUR |
2377 | company_id: 1 |
2378 | @@ -32,6 +32,11 @@ |
2379 | manual: True |
2380 | amount: 1000.00 |
2381 | - |
2382 | + I compute a customer Invoice |
2383 | +- |
2384 | + !python {model: account.invoice}: | |
2385 | + self.button_compute(cr, uid, [ref('invoice_edi_1')]) |
2386 | +- |
2387 | I confirm and open the invoice |
2388 | - |
2389 | !workflow {model: account.invoice, ref: invoice_edi_1, action: invoice_open} |
2390 | |
2391 | === modified file 'account/tests/test_tax.py' |
2392 | --- account/tests/test_tax.py 2012-11-01 20:39:35 +0000 |
2393 | +++ account/tests/test_tax.py 2014-06-02 10:31:27 +0000 |
2394 | @@ -18,13 +18,15 @@ |
2395 | name="Programmatic tax", |
2396 | type='code', |
2397 | python_compute='result = 12.0', |
2398 | + python_applicable='result = 12.0', |
2399 | python_compute_inv='result = 11.0', |
2400 | + tax_invoice_line_ids= [(0, 0, dict(code_type = 'base', amount= 100, apply_on = 'invoice')), \ |
2401 | + (0, 0, dict(code_type = 'tax', amount = 24, apply_on = 'invoice'))] |
2402 | )) |
2403 | |
2404 | tax_records = self.tax_model.browse(cr, uid, [tax_id]) |
2405 | res = self.tax_model.compute_all(cr, uid, tax_records, 50.0, 2) |
2406 | - |
2407 | - tax_detail = res['taxes'][0] |
2408 | + tax_detail = res['taxes'][1] |
2409 | self.assertEquals(tax_detail['amount'], 24.0) |
2410 | self.assertEquals(res['total_included'], 124.0) |
2411 | |
2412 | @@ -34,16 +36,15 @@ |
2413 | tax_id = self.tax_model.create(cr, uid, dict( |
2414 | name="Percent tax", |
2415 | type='percent', |
2416 | - amount='0.1', |
2417 | + amount='10', |
2418 | + tax_invoice_line_ids= [(0, 0, dict(code_type = 'base', amount= 100, apply_on = 'invoice')), \ |
2419 | + (0, 0, dict(code_type = 'tax', amount = 10, apply_on = 'invoice'))] |
2420 | )) |
2421 | |
2422 | tax_records = self.tax_model.browse(cr, uid, [tax_id]) |
2423 | res = self.tax_model.compute_all(cr, uid, tax_records, 50.0, 2) |
2424 | |
2425 | - tax_detail = res['taxes'][0] |
2426 | + tax_detail = res['taxes'][1] |
2427 | self.assertEquals(tax_detail['amount'], 10.0) |
2428 | self.assertEquals(res['total_included'], 110.0) |
2429 | |
2430 | - # now the inverse computation |
2431 | - res = self.tax_model.compute_inv(cr, uid, tax_records, 55.0, 2) |
2432 | - self.assertEquals(res[0]['amount'], 10.0) |
2433 | |
2434 | === modified file 'account/wizard/account_change_currency.py' |
2435 | --- account/wizard/account_change_currency.py 2013-10-27 12:31:04 +0000 |
2436 | +++ account/wizard/account_change_currency.py 2014-06-02 10:31:27 +0000 |
2437 | @@ -71,6 +71,8 @@ |
2438 | new_price = (line.price_unit / old_rate ) * rate |
2439 | obj_inv_line.write(cr, uid, [line.id], {'price_unit': new_price}) |
2440 | obj_inv.write(cr, uid, [invoice.id], {'currency_id': new_currency}, context=context) |
2441 | + #apply computation of tax with new currency |
2442 | + obj_inv.button_reset_taxes(cr, uid, [invoice.id], context=context) |
2443 | return {'type': 'ir.actions.act_window_close'} |
2444 | |
2445 | |
2446 | |
2447 | === modified file 'account_voucher/account_voucher.py' |
2448 | --- account_voucher/account_voucher.py 2014-05-02 13:03:52 +0000 |
2449 | +++ account_voucher/account_voucher.py 2014-06-02 10:31:27 +0000 |
2450 | @@ -440,7 +440,8 @@ |
2451 | if not tax[0].price_include: |
2452 | for line in voucher.line_ids: |
2453 | for tax_line in tax_pool.compute_all(cr, uid, tax, line.amount, 1).get('taxes', []): |
2454 | - total_tax += tax_line.get('amount', 0.0) |
2455 | + if tax_line['code_type'] == 'tax': |
2456 | + total_tax += tax_line.get('amount', 0.0) |
2457 | total += total_tax |
2458 | else: |
2459 | for line in voucher.line_ids: |
2460 | @@ -448,8 +449,9 @@ |
2461 | line_tax = 0.0 |
2462 | |
2463 | for tax_line in tax_pool.compute_all(cr, uid, tax, line.untax_amount or line.amount, 1).get('taxes', []): |
2464 | - line_tax += tax_line.get('amount', 0.0) |
2465 | - line_total += tax_line.get('price_unit') |
2466 | + if tax_line['code_type'] == 'tax': |
2467 | + line_tax += tax_line.get('amount', 0.0) |
2468 | + line_total += tax_line.get('price_unit') |
2469 | total_tax += line_tax |
2470 | untax_amount = line.untax_amount or line.amount |
2471 | voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount}) |
2472 | @@ -487,7 +489,8 @@ |
2473 | |
2474 | if not tax[0].price_include: |
2475 | for tax_line in tax_pool.compute_all(cr, uid, tax, line_amount, 1).get('taxes', []): |
2476 | - total_tax += tax_line.get('amount') |
2477 | + if tax_line['code_type'] == 'tax': |
2478 | + total_tax += tax_line.get('amount') |
2479 | |
2480 | voucher_total += line_amount |
2481 | total = voucher_total + total_tax |
2482 | @@ -1240,8 +1243,9 @@ |
2483 | |
2484 | if move_line.get('account_tax_id', False): |
2485 | tax_data = tax_obj.browse(cr, uid, [move_line['account_tax_id']], context=context)[0] |
2486 | - if not (tax_data.base_code_id and tax_data.tax_code_id): |
2487 | - raise osv.except_osv(_('No Account Base Code and Account Tax Code!'),_("You have to configure account base code and account tax code on the '%s' tax!") % (tax_data.name)) |
2488 | + for tax_invoice_line_id in tax_data.tax_invoice_line_ids: |
2489 | + if not tax_invoice_line_id.code_id: |
2490 | + raise osv.except_osv(_('No Tax Grid!'),_("You have to configure Tax Grid on the '%s' tax!") % (tax_data.name)) |
2491 | |
2492 | # compute the amount in foreign currency |
2493 | foreign_currency_diff = 0.0 |
2494 | |
2495 | === modified file 'account_voucher/test/case1_usd_usd.yml' |
2496 | --- account_voucher/test/case1_usd_usd.yml 2013-10-27 12:31:04 +0000 |
2497 | +++ account_voucher/test/case1_usd_usd.yml 2014-06-02 10:31:27 +0000 |
2498 | @@ -83,6 +83,7 @@ |
2499 | quantity: 1.0 |
2500 | product_id: product.product_product_3 |
2501 | uos_id: product.product_uom_unit |
2502 | + invoice_line_tax_id: [] |
2503 | journal_id: account.sales_journal |
2504 | partner_id: base.res_partner_19 |
2505 | reference_type: none |
2506 | @@ -116,6 +117,7 @@ |
2507 | quantity: 1.0 |
2508 | product_id: product.product_product_3 |
2509 | uos_id: product.product_uom_unit |
2510 | + invoice_line_tax_id: [] |
2511 | journal_id: account.sales_journal |
2512 | partner_id: base.res_partner_19 |
2513 | reference_type: none |
2514 | |
2515 | === modified file 'account_voucher/test/case2_usd_eur_debtor_in_eur.yml' |
2516 | --- account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2013-10-27 12:31:04 +0000 |
2517 | +++ account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2014-06-02 10:31:27 +0000 |
2518 | @@ -88,6 +88,7 @@ |
2519 | quantity: 1.0 |
2520 | product_id: product.product_product_3 |
2521 | uos_id: product.product_uom_unit |
2522 | + invoice_line_tax_id: [] |
2523 | journal_id: account.sales_journal |
2524 | partner_id: base.res_partner_19 |
2525 | reference_type: none |
2526 | @@ -121,6 +122,7 @@ |
2527 | quantity: 1.0 |
2528 | product_id: product.product_product_3 |
2529 | uos_id: product.product_uom_unit |
2530 | + invoice_line_tax_id: [] |
2531 | journal_id: account.sales_journal |
2532 | partner_id: base.res_partner_19 |
2533 | reference_type: none |
2534 | |
2535 | === modified file 'account_voucher/test/case2_usd_eur_debtor_in_usd.yml' |
2536 | --- account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2013-10-27 12:31:04 +0000 |
2537 | +++ account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2014-06-02 10:31:27 +0000 |
2538 | @@ -88,6 +88,7 @@ |
2539 | quantity: 1.0 |
2540 | product_id: product.product_product_3 |
2541 | uos_id: product.product_uom_unit |
2542 | + invoice_line_tax_id: [] |
2543 | journal_id: account.sales_journal |
2544 | partner_id: base.res_partner_19 |
2545 | reference_type: none |
2546 | @@ -121,6 +122,7 @@ |
2547 | quantity: 1.0 |
2548 | product_id: product.product_product_3 |
2549 | uos_id: product.product_uom_unit |
2550 | + invoice_line_tax_id: [] |
2551 | journal_id: account.sales_journal |
2552 | partner_id: base.res_partner_19 |
2553 | reference_type: none |
2554 | |
2555 | === modified file 'account_voucher/test/case3_eur_eur.yml' |
2556 | --- account_voucher/test/case3_eur_eur.yml 2013-10-27 12:31:04 +0000 |
2557 | +++ account_voucher/test/case3_eur_eur.yml 2014-06-02 10:31:27 +0000 |
2558 | @@ -43,6 +43,7 @@ |
2559 | quantity: 1.0 |
2560 | product_id: product.product_product_3 |
2561 | uos_id: product.product_uom_unit |
2562 | + invoice_line_tax_id: [] |
2563 | journal_id: account.sales_journal |
2564 | partner_id: base.res_partner_19 |
2565 | reference_type: none |
2566 | @@ -76,6 +77,7 @@ |
2567 | quantity: 1.0 |
2568 | product_id: product.product_product_3 |
2569 | uos_id: product.product_uom_unit |
2570 | + invoice_line_tax_id: [] |
2571 | journal_id: account.sales_journal |
2572 | partner_id: base.res_partner_19 |
2573 | reference_type: none |
2574 | |
2575 | === modified file 'account_voucher/test/case4_cad_chf.yml' |
2576 | --- account_voucher/test/case4_cad_chf.yml 2013-10-27 12:31:04 +0000 |
2577 | +++ account_voucher/test/case4_cad_chf.yml 2014-06-02 10:31:27 +0000 |
2578 | @@ -77,6 +77,7 @@ |
2579 | quantity: 1.0 |
2580 | product_id: product.product_product_3 |
2581 | uos_id: product.product_uom_unit |
2582 | + invoice_line_tax_id: [] |
2583 | journal_id: account.sales_journal |
2584 | partner_id: base.res_partner_19 |
2585 | reference_type: none |
2586 | |
2587 | === modified file 'account_voucher/test/case5_suppl_usd_usd.yml' |
2588 | --- account_voucher/test/case5_suppl_usd_usd.yml 2013-10-27 12:31:04 +0000 |
2589 | +++ account_voucher/test/case5_suppl_usd_usd.yml 2014-06-02 10:31:27 +0000 |
2590 | @@ -80,6 +80,7 @@ |
2591 | quantity: 1.0 |
2592 | product_id: product.product_product_3 |
2593 | uos_id: product.product_uom_unit |
2594 | + invoice_line_tax_id: [] |
2595 | journal_id: account.sales_journal |
2596 | partner_id: base.res_partner_19 |
2597 | reference_type: none |
2598 | |
2599 | === modified file 'account_voucher/test/case_eur_usd.yml' |
2600 | --- account_voucher/test/case_eur_usd.yml 2013-10-27 12:31:04 +0000 |
2601 | +++ account_voucher/test/case_eur_usd.yml 2014-06-02 10:31:27 +0000 |
2602 | @@ -61,6 +61,7 @@ |
2603 | quantity: 1.0 |
2604 | product_id: product.product_product_3 |
2605 | uos_id: product.product_uom_unit |
2606 | + invoice_line_tax_id: [] |
2607 | journal_id: account.sales_journal |
2608 | partner_id: base.res_partner_19 |
2609 | - |
2610 | |
2611 | === modified file 'account_voucher/test/sales_payment.yml' |
2612 | --- account_voucher/test/sales_payment.yml 2014-04-24 12:35:38 +0000 |
2613 | +++ account_voucher/test/sales_payment.yml 2014-06-02 10:31:27 +0000 |
2614 | @@ -17,6 +17,7 @@ |
2615 | quantity: 1.0 |
2616 | product_id: product.product_product_3 |
2617 | uos_id: product.product_uom_unit |
2618 | + invoice_line_tax_id: [] |
2619 | journal_id: account.sales_journal |
2620 | partner_id: base.res_partner_19 |
2621 | |
2622 | |
2623 | === modified file 'account_voucher/voucher_sales_purchase_view.xml' |
2624 | --- account_voucher/voucher_sales_purchase_view.xml 2014-02-12 18:23:15 +0000 |
2625 | +++ account_voucher/voucher_sales_purchase_view.xml 2014-06-02 10:31:27 +0000 |
2626 | @@ -101,24 +101,23 @@ |
2627 | <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/> |
2628 | </tree> |
2629 | </field> |
2630 | - <group> |
2631 | + <group> |
2632 | <field name="narration" placeholder="Internal Notes" nolabel="1"/> |
2633 | <group class="oe_subtotal_footer oe_right"> |
2634 | <field name="tax_id" |
2635 | - on_change="onchange_price(line_cr_ids, tax_id, partner_id)" |
2636 | - widget="selection" nolabel="1" |
2637 | - placeholder="Tax" |
2638 | - domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/> |
2639 | + on_change="onchange_price(line_cr_ids, tax_id, partner_id)" |
2640 | + widget="selection" nolabel="1" |
2641 | + placeholder="Tax" domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/> |
2642 | <field name="tax_amount" nolabel="1"/> |
2643 | <div class="oe_subtotal_footer_separator"> |
2644 | <label for="amount"/> |
2645 | <button type="object" class="oe_link oe_edit_only" |
2646 | name="compute_tax" string="(update)" |
2647 | attrs="{'invisible': [('state','!=','draft')]}"/> |
2648 | - </div> |
2649 | + </div> |
2650 | <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/> |
2651 | </group> |
2652 | - </group> |
2653 | + </group> |
2654 | </page> |
2655 | <page string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}"> |
2656 | <group col="4"> |
2657 | @@ -269,17 +268,14 @@ |
2658 | <field name="tax_id" |
2659 | on_change="onchange_price(line_dr_ids, tax_id, partner_id)" |
2660 | widget="selection" nolabel="1" |
2661 | - placeholder="Tax" |
2662 | - |
2663 | - domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]" |
2664 | - /> |
2665 | + placeholder="Tax" domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"/> |
2666 | <field name="tax_amount" nolabel="1"/> |
2667 | <div class="oe_subtotal_footer_separator"> |
2668 | <label for="amount"/> |
2669 | <button type="object" class="oe_link oe_edit_only" |
2670 | name="compute_tax" string="(update)" |
2671 | attrs="{'invisible': [('state','!=','draft')]}"/> |
2672 | - </div> |
2673 | + </div> |
2674 | <field name="amount" class="oe_subtotal_footer_separator" nolabel="1"/> |
2675 | </group> |
2676 | </group> |
2677 | |
2678 | === modified file 'hr_expense/hr_expense.py' |
2679 | --- hr_expense/hr_expense.py 2014-03-10 14:36:00 +0000 |
2680 | +++ hr_expense/hr_expense.py 2014-06-02 10:31:27 +0000 |
2681 | @@ -311,8 +311,10 @@ |
2682 | line.unit_amount , |
2683 | line.unit_quantity, line.product_id, |
2684 | exp.user_id.partner_id)['taxes']: |
2685 | - tax_code_id = tax['base_code_id'] |
2686 | - tax_amount = line.total_amount * tax['base_sign'] |
2687 | + if tax['code_type'] == 'base': |
2688 | + continue |
2689 | + tax_code_id = tax['code_id'] |
2690 | + tax_amount = line.total_amount * tax['code_sign'] |
2691 | if tax_code_found: |
2692 | if not tax_code_id: |
2693 | continue |
2694 | @@ -328,16 +330,16 @@ |
2695 | is_price_include = tax_obj.read(cr,uid,tax['id'],['price_include'],context)['price_include'] |
2696 | if is_price_include: |
2697 | ## We need to deduce the price for the tax |
2698 | - res[-1]['price'] = res[-1]['price'] - (tax['amount'] * tax['base_sign'] or 0.0) |
2699 | + res[-1]['price'] = res[-1]['price'] - (tax['amount'] * tax['code_sign'] or 0.0) |
2700 | assoc_tax = { |
2701 | 'type':'tax', |
2702 | 'name':tax['name'], |
2703 | 'price_unit': tax['price_unit'], |
2704 | 'quantity': 1, |
2705 | - 'price': tax['amount'] * tax['base_sign'] or 0.0, |
2706 | - 'account_id': tax['account_collected_id'] or mres['account_id'], |
2707 | - 'tax_code_id': tax['tax_code_id'], |
2708 | - 'tax_amount': tax['amount'] * tax['base_sign'], |
2709 | + 'price': tax['amount'] * tax['code_sign'] or 0.0, |
2710 | + 'account_id': tax['account_id'] or mres['account_id'], |
2711 | + 'tax_code_id': tax['code_id'], |
2712 | + 'tax_amount': tax['amount'] * tax['code_sign'], |
2713 | } |
2714 | res.append(assoc_tax) |
2715 | return res |
2716 | |
2717 | === modified file 'hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml' |
2718 | --- hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml 2013-10-27 12:31:04 +0000 |
2719 | +++ hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml 2014-06-02 10:31:27 +0000 |
2720 | @@ -48,7 +48,12 @@ |
2721 | sequence: 1 |
2722 | company_id: base.main_company |
2723 | type_tax_use: all |
2724 | - tax_code_id: tax_case |
2725 | + tax_invoice_line_ids: |
2726 | + - code_type: base |
2727 | + amount: 100 |
2728 | + - code_type: tax |
2729 | + amount: 10 |
2730 | + code_id: tax_case |
2731 | - |
2732 | I create an Account with the tax |
2733 | - |
2734 | |
2735 | === modified file 'hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml' |
2736 | --- hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml 2013-10-27 12:31:04 +0000 |
2737 | +++ hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml 2014-06-02 10:31:27 +0000 |
2738 | @@ -47,7 +47,12 @@ |
2739 | sequence: 1 |
2740 | company_id: base.main_company |
2741 | type_tax_use: all |
2742 | - tax_code_id: tax_case |
2743 | + tax_invoice_line_ids: |
2744 | + - code_type: base |
2745 | + amount: 100 |
2746 | + - code_type: tax |
2747 | + amount: 8 |
2748 | + code_id: tax_case |
2749 | - |
2750 | I create an Account with the tax |
2751 | - |
2752 | @@ -106,7 +111,6 @@ |
2753 | product = invoice.product_id.id |
2754 | |
2755 | product_exp = data['product'][0] |
2756 | - |
2757 | assert product == product_exp |
2758 | assert aline.invoice_id, "Invoice created, but analytic line wasn't updated." |
2759 | assert aline.invoice_id == invoice_id, "Invoice doesn't match the one at analytic line" |
2760 | |
2761 | === modified file 'l10n_br/account.py' |
2762 | --- l10n_br/account.py 2013-10-27 12:31:04 +0000 |
2763 | +++ l10n_br/account.py 2014-06-02 10:31:27 +0000 |
2764 | @@ -19,6 +19,7 @@ |
2765 | |
2766 | import openerp |
2767 | from openerp.osv import fields, osv |
2768 | +from openerp.addons.account import account |
2769 | |
2770 | TAX_CODE_COLUMNS = { |
2771 | 'domain':fields.char('Domain', size=32, |
2772 | @@ -162,7 +163,6 @@ |
2773 | return result |
2774 | |
2775 | |
2776 | - |
2777 | class account_tax(osv.osv): |
2778 | """ Add fields used to define some brazilian taxes """ |
2779 | _inherit = 'account.tax' |
2780 | @@ -176,12 +176,7 @@ |
2781 | 'amount_mva': fields.float('MVA Percent', required=True, |
2782 | digits_compute=get_precision_tax(), |
2783 | help="Um percentual decimal em % entre 0-1."), |
2784 | - 'type': fields.selection([('percent','Percentage'), |
2785 | - ('fixed','Fixed Amount'), |
2786 | - ('none','None'), |
2787 | - ('code','Python Code'), |
2788 | - ('balance','Balance'), |
2789 | - ('quantity','Quantity')], 'Tax Type', required=True, |
2790 | + 'type': fields.selection(account.TAX_TYPE + [('quantity', 'Quantity')], 'Tax Type', required=True, |
2791 | help="The computation method for the tax amount."), |
2792 | } |
2793 | _defaults = TAX_DEFAULTS |
2794 | |
2795 | === modified file 'l10n_br/account_view.xml' |
2796 | --- l10n_br/account_view.xml 2012-10-29 18:16:57 +0000 |
2797 | +++ l10n_br/account_view.xml 2014-06-02 10:31:27 +0000 |
2798 | @@ -36,9 +36,6 @@ |
2799 | <field position="after" name="price_include"> |
2800 | <field groups="base.group_extended" name="tax_discount"/> |
2801 | </field> |
2802 | - <field name="tax_code_id" position="replace" > |
2803 | - <field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" /> |
2804 | - </field> |
2805 | <field position="after" name="amount"> |
2806 | <field groups="base.group_extended" name="base_reduction"/> |
2807 | <field groups="base.group_extended" name="amount_mva"/> |
2808 | @@ -54,9 +51,6 @@ |
2809 | <field position="after" name="price_include"> |
2810 | <field groups="base.group_extended" name="tax_discount"/> |
2811 | </field> |
2812 | - <field name="tax_code_id" position="replace" > |
2813 | - <field name="tax_code_id" on_change="onchange_tax_code_id(tax_code_id)" /> |
2814 | - </field> |
2815 | <field position="after" name="amount"> |
2816 | <field groups="base.group_extended" name="base_reduction"/> |
2817 | <field groups="base.group_extended" name="amount_mva"/> |
2818 | |
2819 | === modified file 'l10n_br/data/account_tax_template.xml' |
2820 | --- l10n_br/data/account_tax_template.xml 2013-10-27 12:31:04 +0000 |
2821 | +++ l10n_br/data/account_tax_template.xml 2014-06-02 10:31:27 +0000 |
2822 | @@ -1,1343 +1,3893 @@ |
2823 | <?xml version="1.0" encoding="utf-8"?> |
2824 | <openerp> |
2825 | - <data noupdate="0"> |
2826 | - |
2827 | - <record id="tax_template_out_ipi" model="account.tax.template"> |
2828 | - <field name="description">IPI </field> |
2829 | - <field name="name">IPI Saída</field> |
2830 | - <field name="amount">0.00</field> |
2831 | - <field name="type_tax_use">sale</field> |
2832 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2833 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2834 | - <field eval="0" name="price_include"/> |
2835 | - <field eval="0" name="tax_discount"/> |
2836 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2837 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2838 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2839 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2840 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2841 | - </record> |
2842 | - |
2843 | - <record id="tax_template_out_ipi2" model="account.tax.template"> |
2844 | - <field name="description">IPI 2%</field> |
2845 | - <field name="name">IPI Saída 2%</field> |
2846 | - <field name="amount">0.02</field> |
2847 | - <field name="type_tax_use">sale</field> |
2848 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2849 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2850 | - <field eval="0" name="price_include"/> |
2851 | - <field eval="0" name="tax_discount"/> |
2852 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2853 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2854 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2855 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2856 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2857 | - </record> |
2858 | - |
2859 | - <record id="tax_template_out_ipi3" model="account.tax.template"> |
2860 | - <field name="description">IPI 3%</field> |
2861 | - <field name="name">IPI Saída 3%</field> |
2862 | - <field name="amount">0.03</field> |
2863 | - <field name="type_tax_use">sale</field> |
2864 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2865 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2866 | - <field eval="0" name="price_include"/> |
2867 | - <field eval="0" name="tax_discount"/> |
2868 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2869 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2870 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2871 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2872 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2873 | - </record> |
2874 | - |
2875 | - <record id="tax_template_out_ipi4" model="account.tax.template"> |
2876 | - <field name="description">IPI 4%</field> |
2877 | - <field name="name">IPI Saída 4%</field> |
2878 | - <field name="amount">0.04</field> |
2879 | - <field name="type_tax_use">sale</field> |
2880 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2881 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2882 | - <field eval="0" name="price_include"/> |
2883 | - <field eval="0" name="tax_discount"/> |
2884 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2885 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2886 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2887 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2888 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2889 | - </record> |
2890 | - |
2891 | - <record id="tax_template_out_ipi5" model="account.tax.template"> |
2892 | - <field name="description">IPI 5%</field> |
2893 | - <field name="name">IPI Saída 5%</field> |
2894 | - <field name="amount">0.05</field> |
2895 | - <field name="type_tax_use">sale</field> |
2896 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2897 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2898 | - <field eval="0" name="price_include"/> |
2899 | - <field eval="0" name="tax_discount"/> |
2900 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2901 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2902 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2903 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2904 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2905 | - </record> |
2906 | - |
2907 | - <record id="tax_template_out_ipi7" model="account.tax.template"> |
2908 | - <field name="description">IPI 7%</field> |
2909 | - <field name="name">IPI Saída 7%</field> |
2910 | - <field name="amount">0.07</field> |
2911 | - <field name="type_tax_use">sale</field> |
2912 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2913 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2914 | - <field eval="0" name="price_include"/> |
2915 | - <field eval="0" name="tax_discount"/> |
2916 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2917 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2918 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2919 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2920 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2921 | - </record> |
2922 | - |
2923 | - <record id="tax_template_out_ipi8" model="account.tax.template"> |
2924 | - <field name="description">IPI 8%</field> |
2925 | - <field name="name">IPI Saída 8%</field> |
2926 | - <field name="amount">0.08</field> |
2927 | - <field name="type_tax_use">sale</field> |
2928 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2929 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2930 | - <field eval="0" name="price_include"/> |
2931 | - <field eval="0" name="tax_discount"/> |
2932 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2933 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2934 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2935 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2936 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2937 | - </record> |
2938 | - |
2939 | - <record id="tax_template_out_ipi10" model="account.tax.template"> |
2940 | - <field name="description">IPI 10%</field> |
2941 | - <field name="name">IPI Saída 10%</field> |
2942 | - <field name="amount">0.10</field> |
2943 | - <field name="type_tax_use">sale</field> |
2944 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2945 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2946 | - <field eval="0" name="price_include"/> |
2947 | - <field eval="0" name="tax_discount"/> |
2948 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2949 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2950 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2951 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2952 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2953 | - </record> |
2954 | - |
2955 | - <record id="tax_template_out_ipi12" model="account.tax.template"> |
2956 | - <field name="description">IPI 12%</field> |
2957 | - <field name="name">IPI Saída 12%</field> |
2958 | - <field name="amount">0.12</field> |
2959 | - <field name="type_tax_use">sale</field> |
2960 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2961 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2962 | - <field eval="0" name="price_include"/> |
2963 | - <field eval="0" name="tax_discount"/> |
2964 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2965 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2966 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2967 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2968 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2969 | - </record> |
2970 | - |
2971 | - <record id="tax_template_out_ipi13" model="account.tax.template"> |
2972 | - <field name="description">IPI 13%</field> |
2973 | - <field name="name">IPI Saída 13%</field> |
2974 | - <field name="amount">0.13</field> |
2975 | - <field name="type_tax_use">sale</field> |
2976 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2977 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2978 | - <field eval="0" name="price_include"/> |
2979 | - <field eval="0" name="tax_discount"/> |
2980 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2981 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2982 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2983 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
2984 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
2985 | - </record> |
2986 | - |
2987 | - <record id="tax_template_out_ipi15" model="account.tax.template"> |
2988 | - <field name="description">IPI 15%</field> |
2989 | - <field name="name">IPI Saída 15%</field> |
2990 | - <field name="amount">0.15</field> |
2991 | - <field name="type_tax_use">sale</field> |
2992 | - <field ref="account_template_201010301" name="account_collected_id"/> |
2993 | - <field ref="account_template_101050502" name="account_paid_id"/> |
2994 | - <field eval="0" name="price_include"/> |
2995 | - <field eval="0" name="tax_discount"/> |
2996 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
2997 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
2998 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
2999 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3000 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3001 | - </record> |
3002 | - |
3003 | - <record id="tax_template_out_ipi16" model="account.tax.template"> |
3004 | - <field name="description">IPI 16%</field> |
3005 | - <field name="name">IPI Saída 16%</field> |
3006 | - <field name="amount">0.16</field> |
3007 | - <field name="type_tax_use">sale</field> |
3008 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3009 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3010 | - <field eval="0" name="price_include"/> |
3011 | - <field eval="0" name="tax_discount"/> |
3012 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3013 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3014 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3015 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3016 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3017 | - </record> |
3018 | - |
3019 | - <record id="tax_template_out_ipi18" model="account.tax.template"> |
3020 | - <field name="description">IPI 18%</field> |
3021 | - <field name="name">IPI Saída 18%</field> |
3022 | - <field name="amount">0.18</field> |
3023 | - <field name="type_tax_use">sale</field> |
3024 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3025 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3026 | - <field eval="0" name="price_include"/> |
3027 | - <field eval="0" name="tax_discount"/> |
3028 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3029 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3030 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3031 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3032 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3033 | - </record> |
3034 | - |
3035 | - <record id="tax_template_out_ipi20" model="account.tax.template"> |
3036 | - <field name="description">IPI 20%</field> |
3037 | - <field name="name">IPI Saída 20%</field> |
3038 | - <field name="amount">0.20</field> |
3039 | - <field name="type_tax_use">sale</field> |
3040 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3041 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3042 | - <field eval="0" name="price_include"/> |
3043 | - <field eval="0" name="tax_discount"/> |
3044 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3045 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3046 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3047 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3048 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3049 | - </record> |
3050 | - |
3051 | - <record id="tax_template_out_ipi22" model="account.tax.template"> |
3052 | - <field name="description">IPI 22%</field> |
3053 | - <field name="name">IPI Saída 22%</field> |
3054 | - <field name="amount">0.22</field> |
3055 | - <field name="type_tax_use">sale</field> |
3056 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3057 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3058 | - <field eval="0" name="price_include"/> |
3059 | - <field eval="0" name="tax_discount"/> |
3060 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3061 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3062 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3063 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3064 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3065 | - </record> |
3066 | - |
3067 | - <record id="tax_template_out_ipi24" model="account.tax.template"> |
3068 | - <field name="description">IPI 24%</field> |
3069 | - <field name="name">IPI Saída 24%</field> |
3070 | - <field name="amount">0.24</field> |
3071 | - <field name="type_tax_use">sale</field> |
3072 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3073 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3074 | - <field eval="0" name="price_include"/> |
3075 | - <field eval="0" name="tax_discount"/> |
3076 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3077 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3078 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3079 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3080 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3081 | - </record> |
3082 | - |
3083 | - <record id="tax_template_out_ipi25" model="account.tax.template"> |
3084 | - <field name="description">IPI 25%</field> |
3085 | - <field name="name">IPI Saída 25%</field> |
3086 | - <field name="amount">0.25</field> |
3087 | - <field name="type_tax_use">sale</field> |
3088 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3089 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3090 | - <field eval="0" name="price_include"/> |
3091 | - <field eval="0" name="tax_discount"/> |
3092 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3093 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3094 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3095 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3096 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3097 | - </record> |
3098 | - |
3099 | - <record id="tax_template_out_ipi27" model="account.tax.template"> |
3100 | - <field name="description">IPI 27%</field> |
3101 | - <field name="name">IPI Saída 27%</field> |
3102 | - <field name="amount">0.27</field> |
3103 | - <field name="type_tax_use">sale</field> |
3104 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3105 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3106 | - <field eval="0" name="price_include"/> |
3107 | - <field eval="0" name="tax_discount"/> |
3108 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3109 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3110 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3111 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3112 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3113 | - </record> |
3114 | - |
3115 | - <record id="tax_template_out_ipi30" model="account.tax.template"> |
3116 | - <field name="description">IPI 30%</field> |
3117 | - <field name="name">IPI Saída 30%</field> |
3118 | - <field name="amount">0.30</field> |
3119 | - <field name="type_tax_use">sale</field> |
3120 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3121 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3122 | - <field eval="0" name="price_include"/> |
3123 | - <field eval="0" name="tax_discount"/> |
3124 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3125 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3126 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3127 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3128 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3129 | - </record> |
3130 | - |
3131 | - <record id="tax_template_out_ipi35" model="account.tax.template"> |
3132 | - <field name="description">IPI 35%</field> |
3133 | - <field name="name">IPI Saída 35%</field> |
3134 | - <field name="amount">0.35</field> |
3135 | - <field name="type_tax_use">sale</field> |
3136 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3137 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3138 | - <field eval="0" name="price_include"/> |
3139 | - <field eval="0" name="tax_discount"/> |
3140 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3141 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3142 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3143 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3144 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3145 | - </record> |
3146 | - |
3147 | - <record id="tax_template_out_ipi40" model="account.tax.template"> |
3148 | - <field name="description">IPI 40%</field> |
3149 | - <field name="name">IPI Saída 40%</field> |
3150 | - <field name="amount">0.40</field> |
3151 | - <field name="type_tax_use">sale</field> |
3152 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3153 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3154 | - <field eval="0" name="price_include"/> |
3155 | - <field eval="0" name="tax_discount"/> |
3156 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3157 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3158 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3159 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3160 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3161 | - </record> |
3162 | - |
3163 | - <record id="tax_template_out_ipi42" model="account.tax.template"> |
3164 | - <field name="description">IPI 42%</field> |
3165 | - <field name="name">IPI Saída 42%</field> |
3166 | - <field name="amount">0.42</field> |
3167 | - <field name="type_tax_use">sale</field> |
3168 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3169 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3170 | - <field eval="0" name="price_include"/> |
3171 | - <field eval="0" name="tax_discount"/> |
3172 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3173 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3174 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3175 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3176 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3177 | - </record> |
3178 | - |
3179 | - <record id="tax_template_out_ipi45" model="account.tax.template"> |
3180 | - <field name="description">IPI 45%</field> |
3181 | - <field name="name">IPI Saída 45%</field> |
3182 | - <field name="amount">0.45</field> |
3183 | - <field name="type_tax_use">sale</field> |
3184 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3185 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3186 | - <field eval="0" name="price_include"/> |
3187 | - <field eval="0" name="tax_discount"/> |
3188 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3189 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3190 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3191 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3192 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3193 | - </record> |
3194 | - |
3195 | - <record id="tax_template_out_ipi50" model="account.tax.template"> |
3196 | - <field name="description">IPI 50%</field> |
3197 | - <field name="name">IPI Saída 50%</field> |
3198 | - <field name="amount">0.50</field> |
3199 | - <field name="type_tax_use">sale</field> |
3200 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3201 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3202 | - <field eval="0" name="price_include"/> |
3203 | - <field eval="0" name="tax_discount"/> |
3204 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3205 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3206 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3207 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3208 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3209 | - </record> |
3210 | - |
3211 | - <record id="tax_template_out_ipi60" model="account.tax.template"> |
3212 | - <field name="description">IPI 60%</field> |
3213 | - <field name="name">IPI Saída 60%</field> |
3214 | - <field name="amount">0.60</field> |
3215 | - <field name="type_tax_use">sale</field> |
3216 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3217 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3218 | - <field eval="0" name="price_include"/> |
3219 | - <field eval="0" name="tax_discount"/> |
3220 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3221 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3222 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3223 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3224 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3225 | - </record> |
3226 | - |
3227 | - <record id="tax_template_out_ipi300" model="account.tax.template"> |
3228 | - <field name="description">IPI 300%</field> |
3229 | - <field name="name">IPI Saída 300%</field> |
3230 | - <field name="amount">3.00</field> |
3231 | - <field name="type_tax_use">sale</field> |
3232 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3233 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3234 | - <field eval="0" name="price_include"/> |
3235 | - <field eval="0" name="tax_discount"/> |
3236 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3237 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3238 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3239 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3240 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3241 | - </record> |
3242 | - |
3243 | - <record id="tax_template_out_ipi330" model="account.tax.template"> |
3244 | - <field name="description">IPI 330%</field> |
3245 | - <field name="name">IPI Saída 330%</field> |
3246 | - <field name="amount">3.30</field> |
3247 | - <field name="type_tax_use">sale</field> |
3248 | - <field ref="account_template_201010301" name="account_collected_id"/> |
3249 | - <field ref="account_template_101050502" name="account_paid_id"/> |
3250 | - <field eval="0" name="price_include"/> |
3251 | - <field eval="0" name="tax_discount"/> |
3252 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3253 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3254 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3255 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3256 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3257 | - </record> |
3258 | - |
3259 | - <record id="tax_template_in_ipi" model="account.tax.template"> |
3260 | - <field name="description">IPI</field> |
3261 | - <field name="name">IPI Entrada</field> |
3262 | - <field name="amount">0.00</field> |
3263 | - <field name="type_tax_use">purchase</field> |
3264 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3265 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3266 | - <field eval="0" name="price_include"/> |
3267 | - <field eval="0" name="tax_discount"/> |
3268 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3269 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3270 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3271 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3272 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3273 | - </record> |
3274 | - |
3275 | - <record id="tax_template_in_ipi2" model="account.tax.template"> |
3276 | - <field name="description">IPI 2%</field> |
3277 | - <field name="name">IPI Entrada 2%</field> |
3278 | - <field name="amount">0.02</field> |
3279 | - <field name="type_tax_use">purchase</field> |
3280 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3281 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3282 | - <field eval="0" name="price_include"/> |
3283 | - <field eval="0" name="tax_discount"/> |
3284 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3285 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3286 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3287 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3288 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3289 | - </record> |
3290 | - |
3291 | - <record id="tax_template_in_ipi3" model="account.tax.template"> |
3292 | - <field name="description">IPI 3%</field> |
3293 | - <field name="name">IPI Entrada 3%</field> |
3294 | - <field name="amount">0.03</field> |
3295 | - <field name="type_tax_use">purchase</field> |
3296 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3297 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3298 | - <field eval="0" name="price_include"/> |
3299 | - <field eval="0" name="tax_discount"/> |
3300 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3301 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3302 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3303 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3304 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3305 | - </record> |
3306 | - |
3307 | - <record id="tax_template_in_ipi4" model="account.tax.template"> |
3308 | - <field name="description">IPI 4%</field> |
3309 | - <field name="name">IPI Entrada 4%</field> |
3310 | - <field name="amount">0.04</field> |
3311 | - <field name="type_tax_use">purchase</field> |
3312 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3313 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3314 | - <field eval="0" name="price_include"/> |
3315 | - <field eval="0" name="tax_discount"/> |
3316 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3317 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3318 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3319 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3320 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3321 | - </record> |
3322 | - |
3323 | - <record id="tax_template_in_ipi5" model="account.tax.template"> |
3324 | - <field name="description">IPI 5%</field> |
3325 | - <field name="name">IPI Entrada 5%</field> |
3326 | - <field name="amount">0.05</field> |
3327 | - <field name="type_tax_use">purchase</field> |
3328 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3329 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3330 | - <field eval="0" name="price_include"/> |
3331 | - <field eval="0" name="tax_discount"/> |
3332 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3333 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3334 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3335 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3336 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3337 | - </record> |
3338 | - |
3339 | - <record id="tax_template_in_ipi7" model="account.tax.template"> |
3340 | - <field name="description">IPI 7%</field> |
3341 | - <field name="name">IPI Entrada 7%</field> |
3342 | - <field name="amount">0.07</field> |
3343 | - <field name="type_tax_use">purchase</field> |
3344 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3345 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3346 | - <field eval="0" name="price_include"/> |
3347 | - <field eval="0" name="tax_discount"/> |
3348 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3349 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3350 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3351 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3352 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3353 | - </record> |
3354 | - |
3355 | - <record id="tax_template_in_ipi8" model="account.tax.template"> |
3356 | - <field name="description">IPI 8%</field> |
3357 | - <field name="name">IPI Entrada 8%</field> |
3358 | - <field name="amount">0.08</field> |
3359 | - <field name="type_tax_use">purchase</field> |
3360 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3361 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3362 | - <field eval="0" name="price_include"/> |
3363 | - <field eval="0" name="tax_discount"/> |
3364 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3365 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3366 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3367 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3368 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3369 | - </record> |
3370 | - |
3371 | - <record id="tax_template_in_ipi10" model="account.tax.template"> |
3372 | - <field name="description">IPI 10%</field> |
3373 | - <field name="name">IPI Entrada 10%</field> |
3374 | - <field name="amount">0.10</field> |
3375 | - <field name="type_tax_use">purchase</field> |
3376 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3377 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3378 | - <field eval="0" name="price_include"/> |
3379 | - <field eval="0" name="tax_discount"/> |
3380 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3381 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3382 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3383 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3384 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3385 | - </record> |
3386 | - |
3387 | - <record id="tax_template_in_ipi12" model="account.tax.template"> |
3388 | - <field name="description">IPI 12%</field> |
3389 | - <field name="name">IPI Entrada 12%</field> |
3390 | - <field name="amount">0.12</field> |
3391 | - <field name="type_tax_use">purchase</field> |
3392 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3393 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3394 | - <field eval="0" name="price_include"/> |
3395 | - <field eval="0" name="tax_discount"/> |
3396 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3397 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3398 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3399 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3400 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3401 | - </record> |
3402 | - |
3403 | - <record id="tax_template_in_ipi13" model="account.tax.template"> |
3404 | - <field name="description">IPI 13%</field> |
3405 | - <field name="name">IPI Entrada 13%</field> |
3406 | - <field name="amount">0.13</field> |
3407 | - <field name="type_tax_use">purchase</field> |
3408 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3409 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3410 | - <field eval="0" name="price_include"/> |
3411 | - <field eval="0" name="tax_discount"/> |
3412 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3413 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3414 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3415 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3416 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3417 | - </record> |
3418 | - |
3419 | - <record id="tax_template_in_ipi15" model="account.tax.template"> |
3420 | - <field name="description">IPI 15%</field> |
3421 | - <field name="name">IPI Entrada 15%</field> |
3422 | - <field name="amount">0.15</field> |
3423 | - <field name="type_tax_use">purchase</field> |
3424 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3425 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3426 | - <field eval="0" name="price_include"/> |
3427 | - <field eval="0" name="tax_discount"/> |
3428 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3429 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3430 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3431 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3432 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3433 | - </record> |
3434 | - |
3435 | - <record id="tax_template_in_ipi16" model="account.tax.template"> |
3436 | - <field name="description">IPI 16%</field> |
3437 | - <field name="name">IPI Entrada 16%</field> |
3438 | - <field name="amount">0.16</field> |
3439 | - <field name="type_tax_use">purchase</field> |
3440 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3441 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3442 | - <field eval="0" name="price_include"/> |
3443 | - <field eval="0" name="tax_discount"/> |
3444 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3445 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3446 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3447 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3448 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3449 | - </record> |
3450 | - |
3451 | - <record id="tax_template_in_ipi18" model="account.tax.template"> |
3452 | - <field name="description">IPI 18%</field> |
3453 | - <field name="name">IPI Entrada 18%</field> |
3454 | - <field name="amount">0.18</field> |
3455 | - <field name="type_tax_use">purchase</field> |
3456 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3457 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3458 | - <field eval="0" name="price_include"/> |
3459 | - <field eval="0" name="tax_discount"/> |
3460 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3461 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3462 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3463 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3464 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3465 | - </record> |
3466 | - |
3467 | - <record id="tax_template_in_ipi20" model="account.tax.template"> |
3468 | - <field name="description">IPI 20%</field> |
3469 | - <field name="name">IPI Entrada 20%</field> |
3470 | - <field name="amount">0.20</field> |
3471 | - <field name="type_tax_use">purchase</field> |
3472 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3473 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3474 | - <field eval="0" name="price_include"/> |
3475 | - <field eval="0" name="tax_discount"/> |
3476 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3477 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3478 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3479 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3480 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3481 | - </record> |
3482 | - |
3483 | - <record id="tax_template_in_ipi22" model="account.tax.template"> |
3484 | - <field name="description">IPI 22%</field> |
3485 | - <field name="name">IPI Entrada 22%</field> |
3486 | - <field name="amount">0.22</field> |
3487 | - <field name="type_tax_use">purchase</field> |
3488 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3489 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3490 | - <field eval="0" name="price_include"/> |
3491 | - <field eval="0" name="tax_discount"/> |
3492 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3493 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3494 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3495 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3496 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3497 | - </record> |
3498 | - |
3499 | - <record id="tax_template_in_ipi24" model="account.tax.template"> |
3500 | - <field name="description">IPI 24%</field> |
3501 | - <field name="name">IPI Entrada 24%</field> |
3502 | - <field name="amount">0.24</field> |
3503 | - <field name="type_tax_use">purchase</field> |
3504 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3505 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3506 | - <field eval="0" name="price_include"/> |
3507 | - <field eval="0" name="tax_discount"/> |
3508 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3509 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3510 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3511 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3512 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3513 | - </record> |
3514 | - |
3515 | - <record id="tax_template_in_ipi25" model="account.tax.template"> |
3516 | - <field name="description">IPI 25%</field> |
3517 | - <field name="name">IPI Entrada 25%</field> |
3518 | - <field name="amount">0.25</field> |
3519 | - <field name="type_tax_use">purchase</field> |
3520 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3521 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3522 | - <field eval="0" name="price_include"/> |
3523 | - <field eval="0" name="tax_discount"/> |
3524 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3525 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3526 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3527 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3528 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3529 | - </record> |
3530 | - |
3531 | - <record id="tax_template_in_ipi27" model="account.tax.template"> |
3532 | - <field name="description">IPI 27%</field> |
3533 | - <field name="name">IPI Entrada 27%</field> |
3534 | - <field name="amount">0.27</field> |
3535 | - <field name="type_tax_use">purchase</field> |
3536 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3537 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3538 | - <field eval="0" name="price_include"/> |
3539 | - <field eval="0" name="tax_discount"/> |
3540 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3541 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3542 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3543 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3544 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3545 | - </record> |
3546 | - |
3547 | - <record id="tax_template_in_ipi30" model="account.tax.template"> |
3548 | - <field name="description">IPI 30%</field> |
3549 | - <field name="name">IPI Entrada 30%</field> |
3550 | - <field name="amount">0.30</field> |
3551 | - <field name="type_tax_use">purchase</field> |
3552 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3553 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3554 | - <field eval="0" name="price_include"/> |
3555 | - <field eval="0" name="tax_discount"/> |
3556 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3557 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3558 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3559 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3560 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3561 | - </record> |
3562 | - |
3563 | - <record id="tax_template_in_ipi35" model="account.tax.template"> |
3564 | - <field name="description">IPI 35%</field> |
3565 | - <field name="name">IPI Entrada 35%</field> |
3566 | - <field name="amount">0.35</field> |
3567 | - <field name="type_tax_use">purchase</field> |
3568 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3569 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3570 | - <field eval="0" name="price_include"/> |
3571 | - <field eval="0" name="tax_discount"/> |
3572 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3573 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3574 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3575 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3576 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3577 | - </record> |
3578 | - |
3579 | - <record id="tax_template_in_ipi40" model="account.tax.template"> |
3580 | - <field name="description">IPI 40%</field> |
3581 | - <field name="name">IPI Entrada 40%</field> |
3582 | - <field name="amount">0.40</field> |
3583 | - <field name="type_tax_use">purchase</field> |
3584 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3585 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3586 | - <field eval="0" name="price_include"/> |
3587 | - <field eval="0" name="tax_discount"/> |
3588 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3589 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3590 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3591 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3592 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3593 | - </record> |
3594 | - |
3595 | - <record id="tax_template_in_ipi42" model="account.tax.template"> |
3596 | - <field name="description">IPI 42%</field> |
3597 | - <field name="name">IPI Entrada 42%</field> |
3598 | - <field name="amount">0.42</field> |
3599 | - <field name="type_tax_use">purchase</field> |
3600 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3601 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3602 | - <field eval="0" name="price_include"/> |
3603 | - <field eval="0" name="tax_discount"/> |
3604 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3605 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3606 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3607 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3608 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3609 | - </record> |
3610 | - |
3611 | - <record id="tax_template_in_ipi45" model="account.tax.template"> |
3612 | - <field name="description">IPI 45%</field> |
3613 | - <field name="name">IPI Entrada 45%</field> |
3614 | - <field name="amount">0.45</field> |
3615 | - <field name="type_tax_use">purchase</field> |
3616 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3617 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3618 | - <field eval="0" name="price_include"/> |
3619 | - <field eval="0" name="tax_discount"/> |
3620 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3621 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3622 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3623 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3624 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3625 | - </record> |
3626 | - |
3627 | - <record id="tax_template_in_ipi50" model="account.tax.template"> |
3628 | - <field name="description">IPI 50%</field> |
3629 | - <field name="name">IPI Entrada 50%</field> |
3630 | - <field name="amount">0.50</field> |
3631 | - <field name="type_tax_use">purchase</field> |
3632 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3633 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3634 | - <field eval="0" name="price_include"/> |
3635 | - <field eval="0" name="tax_discount"/> |
3636 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3637 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3638 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3639 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3640 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3641 | - </record> |
3642 | - |
3643 | - <record id="tax_template_in_ipi60" model="account.tax.template"> |
3644 | - <field name="description">IPI 60%</field> |
3645 | - <field name="name">IPI Entrada 60%</field> |
3646 | - <field name="amount">0.60</field> |
3647 | - <field name="type_tax_use">purchase</field> |
3648 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3649 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3650 | - <field eval="0" name="price_include"/> |
3651 | - <field eval="0" name="tax_discount"/> |
3652 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3653 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3654 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3655 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3656 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3657 | - </record> |
3658 | - |
3659 | - <record id="tax_template_in_ipi300" model="account.tax.template"> |
3660 | - <field name="description">IPI 300%</field> |
3661 | - <field name="name">IPI Entrada 300%</field> |
3662 | - <field name="amount">3.00</field> |
3663 | - <field name="type_tax_use">purchase</field> |
3664 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3665 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3666 | - <field eval="0" name="price_include"/> |
3667 | - <field eval="0" name="tax_discount"/> |
3668 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3669 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3670 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3671 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3672 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3673 | - </record> |
3674 | - |
3675 | - <record id="tax_template_in_ipi330" model="account.tax.template"> |
3676 | - <field name="description">IPI 330%</field> |
3677 | - <field name="name">IPI Entrada 330%</field> |
3678 | - <field name="amount">3.30</field> |
3679 | - <field name="type_tax_use">purchase</field> |
3680 | - <field ref="account_template_101050502" name="account_collected_id"/> |
3681 | - <field ref="account_template_201010301" name="account_paid_id"/> |
3682 | - <field eval="0" name="price_include"/> |
3683 | - <field eval="0" name="tax_discount"/> |
3684 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3685 | - <field ref="tax_code_template_ipi" name="base_code_id"/> |
3686 | - <field ref="tax_code_template_ipi" name="tax_code_id"/> |
3687 | - <field ref="tax_code_template_ipi" name="ref_base_code_id"/> |
3688 | - <field ref="tax_code_template_ipi" name="ref_tax_code_id"/> |
3689 | - </record> |
3690 | - |
3691 | - <record id="tax_template_out_icms_interno" model="account.tax.template"> |
3692 | - <field name="description">ICMS Interno</field> |
3693 | - <field name="name">ICMS Saida Interno</field> |
3694 | - <field name="amount">0.00</field> |
3695 | - <field name="type_tax_use">sale</field> |
3696 | - <field ref="account_template_201010302" name="account_collected_id"/> |
3697 | - <field ref="account_template_101050505" name="account_paid_id"/> |
3698 | - <field eval="0" name="price_include"/> |
3699 | - <field eval="1" name="tax_discount"/> |
3700 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3701 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3702 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3703 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3704 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3705 | - </record> |
3706 | - |
3707 | - <record id="tax_template_out_icms_externo" model="account.tax.template"> |
3708 | - <field name="description">ICMS Externo</field> |
3709 | - <field name="name">ICMS Saida Externo</field> |
3710 | - <field name="amount">0.00</field> |
3711 | - <field name="type_tax_use">sale</field> |
3712 | - <field ref="account_template_201010302" name="account_collected_id"/> |
3713 | - <field ref="account_template_101050505" name="account_paid_id"/> |
3714 | - <field eval="0" name="price_include"/> |
3715 | - <field eval="1" name="tax_discount"/> |
3716 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3717 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3718 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3719 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3720 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3721 | - </record> |
3722 | - |
3723 | - <record id="tax_template_out_icms_subist" model="account.tax.template"> |
3724 | - <field name="description">ICMS Subist</field> |
3725 | - <field name="name">ICMS Saida Subist</field> |
3726 | - <field name="amount">0.00</field> |
3727 | - <field name="type_tax_use">sale</field> |
3728 | - <field eval="0" name="price_include"/> |
3729 | - <field eval="0" name="tax_discount"/> |
3730 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3731 | - <field ref="tax_code_template_icmsst" name="base_code_id"/> |
3732 | - <field ref="tax_code_template_icmsst" name="tax_code_id"/> |
3733 | - <field ref="tax_code_template_icmsst" name="ref_base_code_id"/> |
3734 | - <field ref="tax_code_template_icmsst" name="ref_tax_code_id"/> |
3735 | - </record> |
3736 | - |
3737 | - <record id="tax_template_out_icms_externo7" model="account.tax.template"> |
3738 | - <field name="description">ICMS Externo 7%</field> |
3739 | - <field name="name">ICMS Saida Externo 7%</field> |
3740 | - <field name="amount">0.07</field> |
3741 | - <field name="type_tax_use">sale</field> |
3742 | - <field ref="account_template_201010302" name="account_collected_id"/> |
3743 | - <field ref="account_template_101050505" name="account_paid_id"/> |
3744 | - <field eval="0" name="price_include"/> |
3745 | - <field eval="1" name="tax_discount"/> |
3746 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3747 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3748 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3749 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3750 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3751 | - </record> |
3752 | - |
3753 | - <record id="tax_template_out_icms_externo12" model="account.tax.template"> |
3754 | - <field name="description">ICMS Externo 12%</field> |
3755 | - <field name="name">ICMS Saida Externo 12%</field> |
3756 | - <field name="amount">0.12</field> |
3757 | - <field name="type_tax_use">sale</field> |
3758 | - <field ref="account_template_201010302" name="account_collected_id"/> |
3759 | - <field ref="account_template_101050505" name="account_paid_id"/> |
3760 | - <field eval="0" name="price_include"/> |
3761 | - <field eval="1" name="tax_discount"/> |
3762 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3763 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3764 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3765 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3766 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3767 | - </record> |
3768 | - |
3769 | - <record id="tax_template_out_icms_interno19" model="account.tax.template"> |
3770 | - <field name="description">ICMS Interno 19%</field> |
3771 | - <field name="name">ICMS Saida Interno 19%</field> |
3772 | - <field name="amount">0.19</field> |
3773 | - <field name="type_tax_use">sale</field> |
3774 | - <field ref="account_template_201010302" name="account_collected_id"/> |
3775 | - <field ref="account_template_101050505" name="account_paid_id"/> |
3776 | - <field eval="0" name="price_include"/> |
3777 | - <field eval="1" name="tax_discount"/> |
3778 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3779 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3780 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3781 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3782 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3783 | - </record> |
3784 | - |
3785 | - <record id="tax_template_out_icms_interno26" model="account.tax.template"> |
3786 | - <field name="description">ICMS Interno 26%</field> |
3787 | - <field name="name">ICMS Saida Interno 26%</field> |
3788 | - <field name="amount">0.26</field> |
3789 | - <field name="type_tax_use">sale</field> |
3790 | - <field ref="account_template_201010302" name="account_collected_id"/> |
3791 | - <field ref="account_template_101050505" name="account_paid_id"/> |
3792 | - <field eval="0" name="price_include"/> |
3793 | - <field eval="1" name="tax_discount"/> |
3794 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3795 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3796 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3797 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3798 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3799 | - </record> |
3800 | - |
3801 | - <record id="tax_template_in_icms_interno" model="account.tax.template"> |
3802 | - <field name="description">ICMS Interno</field> |
3803 | - <field name="name">ICMS Entrada Interno</field> |
3804 | - <field name="amount">0.00</field> |
3805 | - <field name="type_tax_use">purchase</field> |
3806 | - <field ref="account_template_101050505" name="account_collected_id"/> |
3807 | - <field ref="account_template_201010302" name="account_paid_id"/> |
3808 | - <field eval="0" name="price_include"/> |
3809 | - <field eval="1" name="tax_discount"/> |
3810 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3811 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3812 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3813 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3814 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3815 | - </record> |
3816 | - |
3817 | - <record id="tax_template_in_icms_externo" model="account.tax.template"> |
3818 | - <field name="description">ICMS Externo</field> |
3819 | - <field name="name">ICMS Entrada Externo</field> |
3820 | - <field name="amount">0.00</field> |
3821 | - <field name="type_tax_use">purchase</field> |
3822 | - <field ref="account_template_101050505" name="account_collected_id"/> |
3823 | - <field ref="account_template_201010302" name="account_paid_id"/> |
3824 | - <field eval="0" name="price_include"/> |
3825 | - <field eval="1" name="tax_discount"/> |
3826 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3827 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3828 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3829 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3830 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3831 | - </record> |
3832 | - |
3833 | - <record id="tax_template_in_icms_subist" model="account.tax.template"> |
3834 | - <field name="description">ICMS Subist</field> |
3835 | - <field name="name">ICMS Entrada Subist</field> |
3836 | - <field name="amount">0.00</field> |
3837 | - <field name="type_tax_use">purchase</field> |
3838 | - <field eval="0" name="price_include"/> |
3839 | - <field eval="0" name="tax_discount"/> |
3840 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3841 | - <field ref="tax_code_template_icmsst" name="base_code_id"/> |
3842 | - <field ref="tax_code_template_icmsst" name="tax_code_id"/> |
3843 | - <field ref="tax_code_template_icmsst" name="ref_base_code_id"/> |
3844 | - <field ref="tax_code_template_icmsst" name="ref_tax_code_id"/> |
3845 | - </record> |
3846 | - |
3847 | - <record id="tax_template_in_icms_externo7" model="account.tax.template"> |
3848 | - <field name="description">ICMS Externo 7%</field> |
3849 | - <field name="name">ICMS Entrada Externo 7%</field> |
3850 | - <field name="amount">0.07</field> |
3851 | - <field name="type_tax_use">purchase</field> |
3852 | - <field ref="account_template_101050505" name="account_collected_id"/> |
3853 | - <field ref="account_template_201010302" name="account_paid_id"/> |
3854 | - <field eval="0" name="price_include"/> |
3855 | - <field eval="1" name="tax_discount"/> |
3856 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3857 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3858 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3859 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3860 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3861 | - </record> |
3862 | - |
3863 | - <record id="tax_template_in_icms_externo12" model="account.tax.template"> |
3864 | - <field name="description">ICMS Externo 12%</field> |
3865 | - <field name="name">ICMS Entrada Externo 12%</field> |
3866 | - <field name="amount">0.12</field> |
3867 | - <field name="type_tax_use">purchase</field> |
3868 | - <field ref="account_template_101050505" name="account_collected_id"/> |
3869 | - <field ref="account_template_201010302" name="account_paid_id"/> |
3870 | - <field eval="0" name="price_include"/> |
3871 | - <field eval="1" name="tax_discount"/> |
3872 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3873 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3874 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3875 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3876 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3877 | - </record> |
3878 | - |
3879 | - <record id="tax_template_in_icms_interno19" model="account.tax.template"> |
3880 | - <field name="description">ICMS Interno 19%</field> |
3881 | - <field name="name">ICMS Entrada Interno 19%</field> |
3882 | - <field name="amount">0.19</field> |
3883 | - <field name="type_tax_use">purchase</field> |
3884 | - <field ref="account_template_101050505" name="account_collected_id"/> |
3885 | - <field ref="account_template_201010302" name="account_paid_id"/> |
3886 | - <field eval="0" name="price_include"/> |
3887 | - <field eval="1" name="tax_discount"/> |
3888 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3889 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3890 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3891 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3892 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3893 | - </record> |
3894 | - |
3895 | - <record id="tax_template_in_icms_interno26" model="account.tax.template"> |
3896 | - <field name="description">ICMS Interno 26%</field> |
3897 | - <field name="name">ICMS Entrada Interno 26%</field> |
3898 | - <field name="amount">0.26</field> |
3899 | - <field name="type_tax_use">purchase</field> |
3900 | - <field ref="account_template_101050505" name="account_collected_id"/> |
3901 | - <field ref="account_template_201010302" name="account_paid_id"/> |
3902 | - <field eval="0" name="price_include"/> |
3903 | - <field eval="1" name="tax_discount"/> |
3904 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3905 | - <field ref="tax_code_template_icms" name="base_code_id"/> |
3906 | - <field ref="tax_code_template_icms" name="tax_code_id"/> |
3907 | - <field ref="tax_code_template_icms" name="ref_base_code_id"/> |
3908 | - <field ref="tax_code_template_icms" name="ref_tax_code_id"/> |
3909 | - </record> |
3910 | - |
3911 | - <record id="tax_template_out_pis" model="account.tax.template"> |
3912 | - <field name="description">PIS</field> |
3913 | - <field name="name">PIS Saida</field> |
3914 | - <field name="amount">0.00</field> |
3915 | - <field name="type_tax_use">sale</field> |
3916 | - <field ref="account_template_201010500" name="account_collected_id"/> |
3917 | - <field ref="account_template_101050503" name="account_paid_id"/> |
3918 | - <field eval="0" name="price_include"/> |
3919 | - <field eval="1" name="tax_discount"/> |
3920 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3921 | - <field ref="tax_code_template_pis" name="base_code_id"/> |
3922 | - <field ref="tax_code_template_pis" name="tax_code_id"/> |
3923 | - <field ref="tax_code_template_pis" name="ref_base_code_id"/> |
3924 | - <field ref="tax_code_template_pis" name="ref_tax_code_id"/> |
3925 | - </record> |
3926 | - |
3927 | - <record id="tax_template_out_pis065" model="account.tax.template"> |
3928 | - <field name="description">PIS 0,65%</field> |
3929 | - <field name="name">PIS Saida 0,65%</field> |
3930 | - <field name="amount">0.0065</field> |
3931 | - <field name="type_tax_use">sale</field> |
3932 | - <field ref="account_template_201010500" name="account_collected_id"/> |
3933 | - <field ref="account_template_101050503" name="account_paid_id"/> |
3934 | - <field eval="0" name="price_include"/> |
3935 | - <field eval="1" name="tax_discount"/> |
3936 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3937 | - <field ref="tax_code_template_pis" name="base_code_id"/> |
3938 | - <field ref="tax_code_template_pis" name="tax_code_id"/> |
3939 | - <field ref="tax_code_template_pis" name="ref_base_code_id"/> |
3940 | - <field ref="tax_code_template_pis" name="ref_tax_code_id"/> |
3941 | - </record> |
3942 | - |
3943 | - <record id="tax_template_in_pis" model="account.tax.template"> |
3944 | - <field name="description">PIS</field> |
3945 | - <field name="name">PIS Entrada</field> |
3946 | - <field name="amount">0.00</field> |
3947 | - <field name="type_tax_use">purchase</field> |
3948 | - <field ref="account_template_101050503" name="account_collected_id"/> |
3949 | - <field ref="account_template_201010500" name="account_paid_id"/> |
3950 | - <field eval="0" name="price_include"/> |
3951 | - <field eval="1" name="tax_discount"/> |
3952 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3953 | - <field ref="tax_code_template_pis" name="base_code_id"/> |
3954 | - <field ref="tax_code_template_pis" name="tax_code_id"/> |
3955 | - <field ref="tax_code_template_pis" name="ref_base_code_id"/> |
3956 | - <field ref="tax_code_template_pis" name="ref_tax_code_id"/> |
3957 | - </record> |
3958 | - |
3959 | - <record id="tax_template_in_pis065" model="account.tax.template"> |
3960 | - <field name="description">PIS 0,65%</field> |
3961 | - <field name="name">PIS Entrada 0,65%</field> |
3962 | - <field name="amount">0.0065</field> |
3963 | - <field name="type_tax_use">purchase</field> |
3964 | - <field ref="account_template_101050503" name="account_collected_id"/> |
3965 | - <field ref="account_template_201010500" name="account_paid_id"/> |
3966 | - <field eval="0" name="price_include"/> |
3967 | - <field eval="1" name="tax_discount"/> |
3968 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3969 | - <field ref="tax_code_template_pis" name="base_code_id"/> |
3970 | - <field ref="tax_code_template_pis" name="tax_code_id"/> |
3971 | - <field ref="tax_code_template_pis" name="ref_base_code_id"/> |
3972 | - <field ref="tax_code_template_pis" name="ref_tax_code_id"/> |
3973 | - </record> |
3974 | - |
3975 | - <record id="tax_template_out_cofins" model="account.tax.template"> |
3976 | - <field name="description">COFINS</field> |
3977 | - <field name="name">COFINS Saida</field> |
3978 | - <field name="amount">0.00</field> |
3979 | - <field name="type_tax_use">sale</field> |
3980 | - <field ref="account_template_201010500" name="account_collected_id"/> |
3981 | - <field ref="account_template_101050503" name="account_paid_id"/> |
3982 | - <field eval="0" name="price_include"/> |
3983 | - <field eval="1" name="tax_discount"/> |
3984 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
3985 | - <field ref="tax_code_template_cofins" name="base_code_id"/> |
3986 | - <field ref="tax_code_template_cofins" name="tax_code_id"/> |
3987 | - <field ref="tax_code_template_cofins" name="ref_base_code_id"/> |
3988 | - <field ref="tax_code_template_cofins" name="ref_tax_code_id"/> |
3989 | - </record> |
3990 | - |
3991 | - <record id="tax_template_out_cofins3" model="account.tax.template"> |
3992 | - <field name="description">COFINS 3%</field> |
3993 | - <field name="name">COFINS Saida 3%</field> |
3994 | - <field name="amount">0.03</field> |
3995 | - <field name="type_tax_use">sale</field> |
3996 | - <field ref="account_template_201010500" name="account_collected_id"/> |
3997 | - <field ref="account_template_101050503" name="account_paid_id"/> |
3998 | - <field eval="0" name="price_include"/> |
3999 | - <field eval="1" name="tax_discount"/> |
4000 | - <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4001 | - <field ref="tax_code_template_cofins" name="base_code_id"/> |
4002 | - <field ref="tax_code_template_cofins" name="tax_code_id"/> |
4003 | - <field ref="tax_code_template_cofins" name="ref_base_code_id"/> |
4004 | - <field ref="tax_code_template_cofins" name="ref_tax_code_id"/> |
4005 | + <data noupdate="0"> |
4006 | + |
4007 | + <record id="tax_template_out_ipi" model="account.tax.template"> |
4008 | + <field name="description">IPI </field> |
4009 | + <field name="name">IPI Saída</field> |
4010 | + <field name="amount">0.00</field> |
4011 | + <field name="type_tax_use">sale</field> |
4012 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4013 | + </record> |
4014 | + |
4015 | + <record id="tax_template_out_ipi_invoice_base_line" model="account.tax.line.template"> |
4016 | + <field name="code_type">base</field> |
4017 | + <field name="tax_amount">100</field> |
4018 | + <field name="amount">100</field> |
4019 | + <field name="apply_on">invoice</field> |
4020 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4021 | + <field name="tax_id" ref="tax_template_out_ipi"/> |
4022 | + </record> |
4023 | + |
4024 | + <record id="tax_template_out_ipi_invoice_tax_line" model="account.tax.line.template"> |
4025 | + <field name="code_type">tax</field> |
4026 | + <field name="tax_amount">0</field> |
4027 | + <field name="amount">0</field> |
4028 | + <field name="apply_on">invoice</field> |
4029 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4030 | + <field name="account_id" ref="account_template_201010301"/> |
4031 | + <field name="tax_id" ref="tax_template_out_ipi"/> |
4032 | + </record> |
4033 | + |
4034 | + <record id="tax_template_out_ipi_refund_base_line" model="account.tax.line.template"> |
4035 | + <field name="code_type">base</field> |
4036 | + <field name="tax_amount">100</field> |
4037 | + <field name="amount">100</field> |
4038 | + <field name="apply_on">refund</field> |
4039 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4040 | + <field name="tax_id" ref="tax_template_out_ipi"/> |
4041 | + </record> |
4042 | + |
4043 | + <record id="tax_template_out_ipi_refund_tax_line" model="account.tax.line.template"> |
4044 | + <field name="code_type">tax</field> |
4045 | + <field name="tax_amount">0</field> |
4046 | + <field name="amount">0</field> |
4047 | + <field name="apply_on">refund</field> |
4048 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4049 | + <field name="account_id" ref="account_template_101050502"/> |
4050 | + <field name="tax_id" ref="tax_template_out_ipi"/> |
4051 | + </record> |
4052 | + |
4053 | + <record id="tax_template_out_ipi2" model="account.tax.template"> |
4054 | + <field name="description">IPI 2%</field> |
4055 | + <field name="name">IPI Saída 2%</field> |
4056 | + <field name="amount">2</field> |
4057 | + <field name="type_tax_use">sale</field> |
4058 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4059 | + </record> |
4060 | + |
4061 | + <record id="tax_template_out_ipi2_invoice_base_line" model="account.tax.line.template"> |
4062 | + <field name="code_type">base</field> |
4063 | + <field name="tax_amount">100</field> |
4064 | + <field name="amount">100</field> |
4065 | + <field name="apply_on">invoice</field> |
4066 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4067 | + <field name="tax_id" ref="tax_template_out_ipi2"/> |
4068 | + </record> |
4069 | + |
4070 | + <record id="tax_template_out_ipi2_invoice_tax_line" model="account.tax.line.template"> |
4071 | + <field name="code_type">tax</field> |
4072 | + <field name="tax_amount">2</field> |
4073 | + <field name="amount">2</field> |
4074 | + <field name="apply_on">invoice</field> |
4075 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4076 | + <field name="account_id" ref="account_template_201010301"/> |
4077 | + <field name="tax_id" ref="tax_template_out_ipi2"/> |
4078 | + </record> |
4079 | + |
4080 | + <record id="tax_template_out_ipi2_refund_base_line" model="account.tax.line.template"> |
4081 | + <field name="code_type">base</field> |
4082 | + <field name="tax_amount">100</field> |
4083 | + <field name="amount">100</field> |
4084 | + <field name="apply_on">refund</field> |
4085 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4086 | + <field name="tax_id" ref="tax_template_out_ipi2"/> |
4087 | + </record> |
4088 | + |
4089 | + <record id="tax_template_out_ipi2_refund_tax_line" model="account.tax.line.template"> |
4090 | + <field name="code_type">tax</field> |
4091 | + <field name="tax_amount">2</field> |
4092 | + <field name="amount">2</field> |
4093 | + <field name="apply_on">refund</field> |
4094 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4095 | + <field name="account_id" ref="account_template_101050502"/> |
4096 | + <field name="tax_id" ref="tax_template_out_ipi2"/> |
4097 | + </record> |
4098 | + |
4099 | + <record id="tax_template_out_ipi3" model="account.tax.template"> |
4100 | + <field name="description">IPI 3%</field> |
4101 | + <field name="name">IPI Saída 3%</field> |
4102 | + <field name="amount">3</field> |
4103 | + <field name="type_tax_use">sale</field> |
4104 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4105 | + </record> |
4106 | + |
4107 | + <record id="tax_template_out_ipi3_invoice_base_line" model="account.tax.line.template"> |
4108 | + <field name="code_type">base</field> |
4109 | + <field name="tax_amount">100</field> |
4110 | + <field name="amount">100</field> |
4111 | + <field name="apply_on">invoice</field> |
4112 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4113 | + <field name="tax_id" ref="tax_template_out_ipi3"/> |
4114 | + </record> |
4115 | + |
4116 | + <record id="tax_template_out_ipi3_invoice_tax_line" model="account.tax.line.template"> |
4117 | + <field name="code_type">tax</field> |
4118 | + <field name="tax_amount">3</field> |
4119 | + <field name="amount">3</field> |
4120 | + <field name="apply_on">invoice</field> |
4121 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4122 | + <field name="account_id" ref="account_template_201010301"/> |
4123 | + <field name="tax_id" ref="tax_template_out_ipi3"/> |
4124 | + </record> |
4125 | + |
4126 | + <record id="tax_template_out_ipi3_refund_base_line" model="account.tax.line.template"> |
4127 | + <field name="code_type">base</field> |
4128 | + <field name="tax_amount">100</field> |
4129 | + <field name="amount">100</field> |
4130 | + <field name="apply_on">refund</field> |
4131 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4132 | + <field name="tax_id" ref="tax_template_out_ipi3"/> |
4133 | + </record> |
4134 | + |
4135 | + <record id="tax_template_out_ipi3_refund_tax_line" model="account.tax.line.template"> |
4136 | + <field name="code_type">tax</field> |
4137 | + <field name="tax_amount">3</field> |
4138 | + <field name="amount">3</field> |
4139 | + <field name="apply_on">refund</field> |
4140 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4141 | + <field name="account_id" ref="account_template_101050502"/> |
4142 | + <field name="tax_id" ref="tax_template_out_ipi3"/> |
4143 | + </record> |
4144 | + |
4145 | + <record id="tax_template_out_ipi4" model="account.tax.template"> |
4146 | + <field name="description">IPI 4%</field> |
4147 | + <field name="name">IPI Saída 4%</field> |
4148 | + <field name="amount">4</field> |
4149 | + <field name="type_tax_use">sale</field> |
4150 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4151 | + </record> |
4152 | + |
4153 | + <record id="tax_template_out_ipi4_invoice_base_line" model="account.tax.line.template"> |
4154 | + <field name="code_type">base</field> |
4155 | + <field name="tax_amount">100</field> |
4156 | + <field name="amount">100</field> |
4157 | + <field name="apply_on">invoice</field> |
4158 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4159 | + <field name="tax_id" ref="tax_template_out_ipi4"/> |
4160 | + </record> |
4161 | + |
4162 | + <record id="tax_template_out_ipi4_invoice_tax_line" model="account.tax.line.template"> |
4163 | + <field name="code_type">tax</field> |
4164 | + <field name="tax_amount">4</field> |
4165 | + <field name="amount">4</field> |
4166 | + <field name="apply_on">invoice</field> |
4167 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4168 | + <field name="account_id" ref="account_template_201010301"/> |
4169 | + <field name="tax_id" ref="tax_template_out_ipi4"/> |
4170 | + </record> |
4171 | + |
4172 | + <record id="tax_template_out_ipi4_refund_base_line" model="account.tax.line.template"> |
4173 | + <field name="code_type">base</field> |
4174 | + <field name="tax_amount">100</field> |
4175 | + <field name="amount">100</field> |
4176 | + <field name="apply_on">refund</field> |
4177 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4178 | + <field name="tax_id" ref="tax_template_out_ipi4"/> |
4179 | + </record> |
4180 | + |
4181 | + <record id="tax_template_out_ipi4_refund_tax_line" model="account.tax.line.template"> |
4182 | + <field name="code_type">tax</field> |
4183 | + <field name="tax_amount">4</field> |
4184 | + <field name="amount">4</field> |
4185 | + <field name="apply_on">refund</field> |
4186 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4187 | + <field name="account_id" ref="account_template_101050502"/> |
4188 | + <field name="tax_id" ref="tax_template_out_ipi4"/> |
4189 | + </record> |
4190 | + |
4191 | + <record id="tax_template_out_ipi5" model="account.tax.template"> |
4192 | + <field name="description">IPI 5%</field> |
4193 | + <field name="name">IPI Saída 5%</field> |
4194 | + <field name="amount">5</field> |
4195 | + <field name="type_tax_use">sale</field> |
4196 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4197 | + </record> |
4198 | + |
4199 | + <record id="tax_template_out_ipi5_invoice_base_line" model="account.tax.line.template"> |
4200 | + <field name="code_type">base</field> |
4201 | + <field name="tax_amount">100</field> |
4202 | + <field name="amount">100</field> |
4203 | + <field name="apply_on">invoice</field> |
4204 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4205 | + <field name="tax_id" ref="tax_template_out_ipi5"/> |
4206 | + </record> |
4207 | + |
4208 | + <record id="tax_template_out_ipi5_invoice_tax_line" model="account.tax.line.template"> |
4209 | + <field name="code_type">tax</field> |
4210 | + <field name="tax_amount">5</field> |
4211 | + <field name="amount">5</field> |
4212 | + <field name="apply_on">invoice</field> |
4213 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4214 | + <field name="account_id" ref="account_template_201010301"/> |
4215 | + <field name="tax_id" ref="tax_template_out_ipi5"/> |
4216 | + </record> |
4217 | + |
4218 | + <record id="tax_template_out_ipi5_refund_base_line" model="account.tax.line.template"> |
4219 | + <field name="code_type">base</field> |
4220 | + <field name="tax_amount">100</field> |
4221 | + <field name="amount">100</field> |
4222 | + <field name="apply_on">refund</field> |
4223 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4224 | + <field name="tax_id" ref="tax_template_out_ipi5"/> |
4225 | + </record> |
4226 | + |
4227 | + <record id="tax_template_out_ipi5_refund_tax_line" model="account.tax.line.template"> |
4228 | + <field name="code_type">tax</field> |
4229 | + <field name="tax_amount">5</field> |
4230 | + <field name="amount">5</field> |
4231 | + <field name="apply_on">refund</field> |
4232 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4233 | + <field name="account_id" ref="account_template_101050502"/> |
4234 | + <field name="tax_id" ref="tax_template_out_ipi5"/> |
4235 | + </record> |
4236 | + |
4237 | + <record id="tax_template_out_ipi7" model="account.tax.template"> |
4238 | + <field name="description">IPI 7%</field> |
4239 | + <field name="name">IPI Saída 7%</field> |
4240 | + <field name="amount">7</field> |
4241 | + <field name="type_tax_use">sale</field> |
4242 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4243 | + </record> |
4244 | + |
4245 | + <record id="tax_template_out_ipi7_invoice_base_line" model="account.tax.line.template"> |
4246 | + <field name="code_type">base</field> |
4247 | + <field name="tax_amount">100</field> |
4248 | + <field name="amount">100</field> |
4249 | + <field name="apply_on">invoice</field> |
4250 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4251 | + <field name="tax_id" ref="tax_template_out_ipi7"/> |
4252 | + </record> |
4253 | + |
4254 | + <record id="tax_template_out_ipi7_invoice_tax_line" model="account.tax.line.template"> |
4255 | + <field name="code_type">tax</field> |
4256 | + <field name="tax_amount">7</field> |
4257 | + <field name="amount">7</field> |
4258 | + <field name="apply_on">invoice</field> |
4259 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4260 | + <field name="account_id" ref="account_template_201010301"/> |
4261 | + <field name="tax_id" ref="tax_template_out_ipi7"/> |
4262 | + </record> |
4263 | + |
4264 | + <record id="tax_template_out_ipi7_refund_base_line" model="account.tax.line.template"> |
4265 | + <field name="code_type">base</field> |
4266 | + <field name="tax_amount">100</field> |
4267 | + <field name="amount">100</field> |
4268 | + <field name="apply_on">refund</field> |
4269 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4270 | + <field name="tax_id" ref="tax_template_out_ipi7"/> |
4271 | + </record> |
4272 | + |
4273 | + <record id="tax_template_out_ipi7_refund_tax_line" model="account.tax.line.template"> |
4274 | + <field name="code_type">tax</field> |
4275 | + <field name="tax_amount">7</field> |
4276 | + <field name="amount">7</field> |
4277 | + <field name="apply_on">refund</field> |
4278 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4279 | + <field name="account_id" ref="account_template_101050502"/> |
4280 | + <field name="tax_id" ref="tax_template_out_ipi7"/> |
4281 | + </record> |
4282 | + |
4283 | + <record id="tax_template_out_ipi8" model="account.tax.template"> |
4284 | + <field name="description">IPI 8%</field> |
4285 | + <field name="name">IPI Saída 8%</field> |
4286 | + <field name="amount">8</field> |
4287 | + <field name="type_tax_use">sale</field> |
4288 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4289 | + </record> |
4290 | + |
4291 | + <record id="tax_template_out_ipi8_invoice_base_line" model="account.tax.line.template"> |
4292 | + <field name="code_type">base</field> |
4293 | + <field name="tax_amount">100</field> |
4294 | + <field name="amount">100</field> |
4295 | + <field name="apply_on">invoice</field> |
4296 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4297 | + <field name="tax_id" ref="tax_template_out_ipi8"/> |
4298 | + </record> |
4299 | + |
4300 | + <record id="tax_template_out_ipi8_invoice_tax_line" model="account.tax.line.template"> |
4301 | + <field name="code_type">tax</field> |
4302 | + <field name="tax_amount">8</field> |
4303 | + <field name="amount">8</field> |
4304 | + <field name="apply_on">invoice</field> |
4305 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4306 | + <field name="account_id" ref="account_template_201010301"/> |
4307 | + <field name="tax_id" ref="tax_template_out_ipi8"/> |
4308 | + </record> |
4309 | + |
4310 | + <record id="tax_template_out_ipi8_refund_base_line" model="account.tax.line.template"> |
4311 | + <field name="code_type">base</field> |
4312 | + <field name="tax_amount">100</field> |
4313 | + <field name="amount">100</field> |
4314 | + <field name="apply_on">refund</field> |
4315 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4316 | + <field name="tax_id" ref="tax_template_out_ipi8"/> |
4317 | + </record> |
4318 | + |
4319 | + <record id="tax_template_out_ipi8_refund_tax_line" model="account.tax.line.template"> |
4320 | + <field name="code_type">tax</field> |
4321 | + <field name="tax_amount">8</field> |
4322 | + <field name="amount">8</field> |
4323 | + <field name="apply_on">refund</field> |
4324 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4325 | + <field name="account_id" ref="account_template_101050502"/> |
4326 | + <field name="tax_id" ref="tax_template_out_ipi8"/> |
4327 | + </record> |
4328 | + |
4329 | + <record id="tax_template_out_ipi10" model="account.tax.template"> |
4330 | + <field name="description">IPI 10%</field> |
4331 | + <field name="name">IPI Saída 10%</field> |
4332 | + <field name="amount">10</field> |
4333 | + <field name="type_tax_use">sale</field> |
4334 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4335 | + </record> |
4336 | + |
4337 | + <record id="tax_template_out_ipi10_invoice_base_line" model="account.tax.line.template"> |
4338 | + <field name="code_type">base</field> |
4339 | + <field name="tax_amount">100</field> |
4340 | + <field name="amount">100</field> |
4341 | + <field name="apply_on">invoice</field> |
4342 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4343 | + <field name="tax_id" ref="tax_template_out_ipi10"/> |
4344 | + </record> |
4345 | + |
4346 | + <record id="tax_template_out_ipi10_invoice_tax_line" model="account.tax.line.template"> |
4347 | + <field name="code_type">tax</field> |
4348 | + <field name="tax_amount">10</field> |
4349 | + <field name="amount">10</field> |
4350 | + <field name="apply_on">invoice</field> |
4351 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4352 | + <field name="account_id" ref="account_template_201010301"/> |
4353 | + <field name="tax_id" ref="tax_template_out_ipi10"/> |
4354 | + </record> |
4355 | + |
4356 | + <record id="tax_template_out_ipi10_refund_base_line" model="account.tax.line.template"> |
4357 | + <field name="code_type">base</field> |
4358 | + <field name="tax_amount">100</field> |
4359 | + <field name="amount">100</field> |
4360 | + <field name="apply_on">refund</field> |
4361 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4362 | + <field name="tax_id" ref="tax_template_out_ipi10"/> |
4363 | + </record> |
4364 | + |
4365 | + <record id="tax_template_out_ipi10_refund_tax_line" model="account.tax.line.template"> |
4366 | + <field name="code_type">tax</field> |
4367 | + <field name="tax_amount">10</field> |
4368 | + <field name="amount">10</field> |
4369 | + <field name="apply_on">refund</field> |
4370 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4371 | + <field name="account_id" ref="account_template_101050502"/> |
4372 | + <field name="tax_id" ref="tax_template_out_ipi10"/> |
4373 | + </record> |
4374 | + |
4375 | + <record id="tax_template_out_ipi12" model="account.tax.template"> |
4376 | + <field name="description">IPI 12%</field> |
4377 | + <field name="name">IPI Saída 12%</field> |
4378 | + <field name="amount">12</field> |
4379 | + <field name="type_tax_use">sale</field> |
4380 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4381 | + </record> |
4382 | + |
4383 | + <record id="tax_template_out_ipi12_invoice_base_line" model="account.tax.line.template"> |
4384 | + <field name="code_type">base</field> |
4385 | + <field name="tax_amount">100</field> |
4386 | + <field name="amount">100</field> |
4387 | + <field name="apply_on">invoice</field> |
4388 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4389 | + <field name="tax_id" ref="tax_template_out_ipi12"/> |
4390 | + </record> |
4391 | + |
4392 | + <record id="tax_template_out_ipi12_invoice_tax_line" model="account.tax.line.template"> |
4393 | + <field name="code_type">tax</field> |
4394 | + <field name="tax_amount">12</field> |
4395 | + <field name="amount">12</field> |
4396 | + <field name="apply_on">invoice</field> |
4397 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4398 | + <field name="account_id" ref="account_template_201010301"/> |
4399 | + <field name="tax_id" ref="tax_template_out_ipi12"/> |
4400 | + </record> |
4401 | + |
4402 | + <record id="tax_template_out_ipi12_refund_base_line" model="account.tax.line.template"> |
4403 | + <field name="code_type">base</field> |
4404 | + <field name="tax_amount">100</field> |
4405 | + <field name="amount">100</field> |
4406 | + <field name="apply_on">refund</field> |
4407 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4408 | + <field name="tax_id" ref="tax_template_out_ipi12"/> |
4409 | + </record> |
4410 | + |
4411 | + <record id="tax_template_out_ipi12_refund_tax_line" model="account.tax.line.template"> |
4412 | + <field name="code_type">tax</field> |
4413 | + <field name="tax_amount">12</field> |
4414 | + <field name="amount">12</field> |
4415 | + <field name="apply_on">refund</field> |
4416 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4417 | + <field name="account_id" ref="account_template_101050502"/> |
4418 | + <field name="tax_id" ref="tax_template_out_ipi12"/> |
4419 | + </record> |
4420 | + |
4421 | + <record id="tax_template_out_ipi13" model="account.tax.template"> |
4422 | + <field name="description">IPI 13%</field> |
4423 | + <field name="name">IPI Saída 13%</field> |
4424 | + <field name="amount">13</field> |
4425 | + <field name="type_tax_use">sale</field> |
4426 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4427 | + </record> |
4428 | + |
4429 | + <record id="tax_template_out_ipi13_invoice_base_line" model="account.tax.line.template"> |
4430 | + <field name="code_type">base</field> |
4431 | + <field name="tax_amount">100</field> |
4432 | + <field name="amount">100</field> |
4433 | + <field name="apply_on">invoice</field> |
4434 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4435 | + <field name="tax_id" ref="tax_template_out_ipi13"/> |
4436 | + </record> |
4437 | + |
4438 | + <record id="tax_template_out_ipi13_invoice_tax_line" model="account.tax.line.template"> |
4439 | + <field name="code_type">tax</field> |
4440 | + <field name="tax_amount">13</field> |
4441 | + <field name="amount">13</field> |
4442 | + <field name="apply_on">invoice</field> |
4443 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4444 | + <field name="account_id" ref="account_template_201010301"/> |
4445 | + <field name="tax_id" ref="tax_template_out_ipi13"/> |
4446 | + </record> |
4447 | + |
4448 | + <record id="tax_template_out_ipi13_refund_base_line" model="account.tax.line.template"> |
4449 | + <field name="code_type">base</field> |
4450 | + <field name="tax_amount">100</field> |
4451 | + <field name="amount">100</field> |
4452 | + <field name="apply_on">refund</field> |
4453 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4454 | + <field name="tax_id" ref="tax_template_out_ipi13"/> |
4455 | + </record> |
4456 | + |
4457 | + <record id="tax_template_out_ipi13_refund_tax_line" model="account.tax.line.template"> |
4458 | + <field name="code_type">tax</field> |
4459 | + <field name="tax_amount">13</field> |
4460 | + <field name="amount">13</field> |
4461 | + <field name="apply_on">refund</field> |
4462 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4463 | + <field name="account_id" ref="account_template_101050502"/> |
4464 | + <field name="tax_id" ref="tax_template_out_ipi13"/> |
4465 | + </record> |
4466 | + |
4467 | + <record id="tax_template_out_ipi15" model="account.tax.template"> |
4468 | + <field name="description">IPI 15%</field> |
4469 | + <field name="name">IPI Saída 15%</field> |
4470 | + <field name="amount">15</field> |
4471 | + <field name="type_tax_use">sale</field> |
4472 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4473 | + </record> |
4474 | + |
4475 | + <record id="tax_template_out_ipi15_invoice_base_line" model="account.tax.line.template"> |
4476 | + <field name="code_type">base</field> |
4477 | + <field name="tax_amount">100</field> |
4478 | + <field name="amount">100</field> |
4479 | + <field name="apply_on">invoice</field> |
4480 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4481 | + <field name="tax_id" ref="tax_template_out_ipi15"/> |
4482 | + </record> |
4483 | + |
4484 | + <record id="tax_template_out_ipi15_invoice_tax_line" model="account.tax.line.template"> |
4485 | + <field name="code_type">tax</field> |
4486 | + <field name="tax_amount">15</field> |
4487 | + <field name="amount">15</field> |
4488 | + <field name="apply_on">invoice</field> |
4489 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4490 | + <field name="account_id" ref="account_template_201010301"/> |
4491 | + <field name="tax_id" ref="tax_template_out_ipi15"/> |
4492 | + </record> |
4493 | + |
4494 | + <record id="tax_template_out_ipi15_refund_base_line" model="account.tax.line.template"> |
4495 | + <field name="code_type">base</field> |
4496 | + <field name="tax_amount">100</field> |
4497 | + <field name="amount">100</field> |
4498 | + <field name="apply_on">refund</field> |
4499 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4500 | + <field name="tax_id" ref="tax_template_out_ipi15"/> |
4501 | + </record> |
4502 | + |
4503 | + <record id="tax_template_out_ipi15_refund_tax_line" model="account.tax.line.template"> |
4504 | + <field name="code_type">tax</field> |
4505 | + <field name="tax_amount">15</field> |
4506 | + <field name="amount">15</field> |
4507 | + <field name="apply_on">refund</field> |
4508 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4509 | + <field name="account_id" ref="account_template_101050502"/> |
4510 | + <field name="tax_id" ref="tax_template_out_ipi15"/> |
4511 | + </record> |
4512 | + |
4513 | + <record id="tax_template_out_ipi16" model="account.tax.template"> |
4514 | + <field name="description">IPI 16%</field> |
4515 | + <field name="name">IPI Saída 16%</field> |
4516 | + <field name="amount">16</field> |
4517 | + <field name="type_tax_use">sale</field> |
4518 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4519 | + </record> |
4520 | + |
4521 | + <record id="tax_template_out_ipi16_invoice_base_line" model="account.tax.line.template"> |
4522 | + <field name="code_type">base</field> |
4523 | + <field name="tax_amount">100</field> |
4524 | + <field name="amount">100</field> |
4525 | + <field name="apply_on">invoice</field> |
4526 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4527 | + <field name="tax_id" ref="tax_template_out_ipi16"/> |
4528 | + </record> |
4529 | + |
4530 | + <record id="tax_template_out_ipi16_invoice_tax_line" model="account.tax.line.template"> |
4531 | + <field name="code_type">tax</field> |
4532 | + <field name="tax_amount">16</field> |
4533 | + <field name="amount">16</field> |
4534 | + <field name="apply_on">invoice</field> |
4535 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4536 | + <field name="account_id" ref="account_template_201010301"/> |
4537 | + <field name="tax_id" ref="tax_template_out_ipi16"/> |
4538 | + </record> |
4539 | + |
4540 | + <record id="tax_template_out_ipi16_refund_base_line" model="account.tax.line.template"> |
4541 | + <field name="code_type">base</field> |
4542 | + <field name="tax_amount">100</field> |
4543 | + <field name="amount">100</field> |
4544 | + <field name="apply_on">refund</field> |
4545 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4546 | + <field name="tax_id" ref="tax_template_out_ipi16"/> |
4547 | + </record> |
4548 | + |
4549 | + <record id="tax_template_out_ipi16_refund_tax_line" model="account.tax.line.template"> |
4550 | + <field name="code_type">tax</field> |
4551 | + <field name="tax_amount">16</field> |
4552 | + <field name="amount">16</field> |
4553 | + <field name="apply_on">refund</field> |
4554 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4555 | + <field name="account_id" ref="account_template_101050502"/> |
4556 | + <field name="tax_id" ref="tax_template_out_ipi16"/> |
4557 | + </record> |
4558 | + |
4559 | + <record id="tax_template_out_ipi18" model="account.tax.template"> |
4560 | + <field name="description">IPI 18%</field> |
4561 | + <field name="name">IPI Saída 18%</field> |
4562 | + <field name="amount">18</field> |
4563 | + <field name="type_tax_use">sale</field> |
4564 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4565 | + </record> |
4566 | + |
4567 | + <record id="tax_template_out_ipi18_invoice_base_line" model="account.tax.line.template"> |
4568 | + <field name="code_type">base</field> |
4569 | + <field name="tax_amount">100</field> |
4570 | + <field name="amount">100</field> |
4571 | + <field name="apply_on">invoice</field> |
4572 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4573 | + <field name="tax_id" ref="tax_template_out_ipi18"/> |
4574 | + </record> |
4575 | + |
4576 | + <record id="tax_template_out_ipi18_invoice_tax_line" model="account.tax.line.template"> |
4577 | + <field name="code_type">tax</field> |
4578 | + <field name="tax_amount">18</field> |
4579 | + <field name="amount">18</field> |
4580 | + <field name="apply_on">invoice</field> |
4581 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4582 | + <field name="account_id" ref="account_template_201010301"/> |
4583 | + <field name="tax_id" ref="tax_template_out_ipi18"/> |
4584 | + </record> |
4585 | + |
4586 | + <record id="tax_template_out_ipi18_refund_base_line" model="account.tax.line.template"> |
4587 | + <field name="code_type">base</field> |
4588 | + <field name="tax_amount">100</field> |
4589 | + <field name="amount">100</field> |
4590 | + <field name="apply_on">refund</field> |
4591 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4592 | + <field name="tax_id" ref="tax_template_out_ipi18"/> |
4593 | + </record> |
4594 | + |
4595 | + <record id="tax_template_out_ipi18_refund_tax_line" model="account.tax.line.template"> |
4596 | + <field name="code_type">tax</field> |
4597 | + <field name="tax_amount">18</field> |
4598 | + <field name="amount">18</field> |
4599 | + <field name="apply_on">refund</field> |
4600 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4601 | + <field name="account_id" ref="account_template_101050502"/> |
4602 | + <field name="tax_id" ref="tax_template_out_ipi18"/> |
4603 | + </record> |
4604 | + |
4605 | + <record id="tax_template_out_ipi20" model="account.tax.template"> |
4606 | + <field name="description">IPI 20%</field> |
4607 | + <field name="name">IPI Saída 20%</field> |
4608 | + <field name="amount">20</field> |
4609 | + <field name="type_tax_use">sale</field> |
4610 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4611 | + </record> |
4612 | + |
4613 | + <record id="tax_template_out_ipi20_invoice_base_line" model="account.tax.line.template"> |
4614 | + <field name="code_type">base</field> |
4615 | + <field name="tax_amount">100</field> |
4616 | + <field name="amount">100</field> |
4617 | + <field name="apply_on">invoice</field> |
4618 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4619 | + <field name="tax_id" ref="tax_template_out_ipi20"/> |
4620 | + </record> |
4621 | + |
4622 | + <record id="tax_template_out_ipi20_invoice_tax_line" model="account.tax.line.template"> |
4623 | + <field name="code_type">tax</field> |
4624 | + <field name="tax_amount">20</field> |
4625 | + <field name="amount">20</field> |
4626 | + <field name="apply_on">invoice</field> |
4627 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4628 | + <field name="account_id" ref="account_template_201010301"/> |
4629 | + <field name="tax_id" ref="tax_template_out_ipi20"/> |
4630 | + </record> |
4631 | + |
4632 | + <record id="tax_template_out_ipi20_refund_base_line" model="account.tax.line.template"> |
4633 | + <field name="code_type">base</field> |
4634 | + <field name="tax_amount">100</field> |
4635 | + <field name="amount">100</field> |
4636 | + <field name="apply_on">refund</field> |
4637 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4638 | + <field name="tax_id" ref="tax_template_out_ipi20"/> |
4639 | + </record> |
4640 | + |
4641 | + <record id="tax_template_out_ipi20_refund_tax_line" model="account.tax.line.template"> |
4642 | + <field name="code_type">tax</field> |
4643 | + <field name="tax_amount">20</field> |
4644 | + <field name="amount">20</field> |
4645 | + <field name="apply_on">refund</field> |
4646 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4647 | + <field name="account_id" ref="account_template_101050502"/> |
4648 | + <field name="tax_id" ref="tax_template_out_ipi20"/> |
4649 | + </record> |
4650 | + |
4651 | + <record id="tax_template_out_ipi22" model="account.tax.template"> |
4652 | + <field name="description">IPI 22%</field> |
4653 | + <field name="name">IPI Saída 22%</field> |
4654 | + <field name="amount">22</field> |
4655 | + <field name="type_tax_use">sale</field> |
4656 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4657 | + </record> |
4658 | + |
4659 | + <record id="tax_template_out_ipi22_invoice_base_line" model="account.tax.line.template"> |
4660 | + <field name="code_type">base</field> |
4661 | + <field name="tax_amount">100</field> |
4662 | + <field name="amount">100</field> |
4663 | + <field name="apply_on">invoice</field> |
4664 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4665 | + <field name="tax_id" ref="tax_template_out_ipi22"/> |
4666 | + </record> |
4667 | + |
4668 | + <record id="tax_template_out_ipi22_invoice_tax_line" model="account.tax.line.template"> |
4669 | + <field name="code_type">tax</field> |
4670 | + <field name="tax_amount">22</field> |
4671 | + <field name="amount">22</field> |
4672 | + <field name="apply_on">invoice</field> |
4673 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4674 | + <field name="account_id" ref="account_template_201010301"/> |
4675 | + <field name="tax_id" ref="tax_template_out_ipi22"/> |
4676 | + </record> |
4677 | + |
4678 | + <record id="tax_template_out_ipi22_refund_base_line" model="account.tax.line.template"> |
4679 | + <field name="code_type">base</field> |
4680 | + <field name="tax_amount">100</field> |
4681 | + <field name="amount">100</field> |
4682 | + <field name="apply_on">refund</field> |
4683 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4684 | + <field name="tax_id" ref="tax_template_out_ipi22"/> |
4685 | + </record> |
4686 | + |
4687 | + <record id="tax_template_out_ipi22_refund_tax_line" model="account.tax.line.template"> |
4688 | + <field name="code_type">tax</field> |
4689 | + <field name="tax_amount">22</field> |
4690 | + <field name="amount">22</field> |
4691 | + <field name="apply_on">refund</field> |
4692 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4693 | + <field name="account_id" ref="account_template_101050502"/> |
4694 | + <field name="tax_id" ref="tax_template_out_ipi22"/> |
4695 | + </record> |
4696 | + |
4697 | + <record id="tax_template_out_ipi24" model="account.tax.template"> |
4698 | + <field name="description">IPI 24%</field> |
4699 | + <field name="name">IPI Saída 24%</field> |
4700 | + <field name="amount">24</field> |
4701 | + <field name="type_tax_use">sale</field> |
4702 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4703 | + </record> |
4704 | + |
4705 | + <record id="tax_template_out_ipi24_invoice_base_line" model="account.tax.line.template"> |
4706 | + <field name="code_type">base</field> |
4707 | + <field name="tax_amount">100</field> |
4708 | + <field name="amount">100</field> |
4709 | + <field name="apply_on">invoice</field> |
4710 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4711 | + <field name="tax_id" ref="tax_template_out_ipi24"/> |
4712 | + </record> |
4713 | + |
4714 | + <record id="tax_template_out_ipi24_invoice_tax_line" model="account.tax.line.template"> |
4715 | + <field name="code_type">tax</field> |
4716 | + <field name="tax_amount">24</field> |
4717 | + <field name="amount">24</field> |
4718 | + <field name="apply_on">invoice</field> |
4719 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4720 | + <field name="account_id" ref="account_template_201010301"/> |
4721 | + <field name="tax_id" ref="tax_template_out_ipi24"/> |
4722 | + </record> |
4723 | + |
4724 | + <record id="tax_template_out_ipi24_refund_base_line" model="account.tax.line.template"> |
4725 | + <field name="code_type">base</field> |
4726 | + <field name="tax_amount">100</field> |
4727 | + <field name="amount">100</field> |
4728 | + <field name="apply_on">refund</field> |
4729 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4730 | + <field name="tax_id" ref="tax_template_out_ipi24"/> |
4731 | + </record> |
4732 | + |
4733 | + <record id="tax_template_out_ipi24_refund_tax_line" model="account.tax.line.template"> |
4734 | + <field name="code_type">tax</field> |
4735 | + <field name="tax_amount">24</field> |
4736 | + <field name="amount">24</field> |
4737 | + <field name="apply_on">refund</field> |
4738 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4739 | + <field name="account_id" ref="account_template_101050502"/> |
4740 | + <field name="tax_id" ref="tax_template_out_ipi24"/> |
4741 | + </record> |
4742 | + |
4743 | + <record id="tax_template_out_ipi25" model="account.tax.template"> |
4744 | + <field name="description">IPI 25%</field> |
4745 | + <field name="name">IPI Saída 25%</field> |
4746 | + <field name="amount">25</field> |
4747 | + <field name="type_tax_use">sale</field> |
4748 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4749 | + </record> |
4750 | + |
4751 | + <record id="tax_template_out_ipi25_invoice_base_line" model="account.tax.line.template"> |
4752 | + <field name="code_type">base</field> |
4753 | + <field name="tax_amount">100</field> |
4754 | + <field name="amount">100</field> |
4755 | + <field name="apply_on">invoice</field> |
4756 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4757 | + <field name="tax_id" ref="tax_template_out_ipi25"/> |
4758 | + </record> |
4759 | + |
4760 | + <record id="tax_template_out_ipi25_invoice_tax_line" model="account.tax.line.template"> |
4761 | + <field name="code_type">tax</field> |
4762 | + <field name="tax_amount">25</field> |
4763 | + <field name="amount">25</field> |
4764 | + <field name="apply_on">invoice</field> |
4765 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4766 | + <field name="account_id" ref="account_template_201010301"/> |
4767 | + <field name="tax_id" ref="tax_template_out_ipi25"/> |
4768 | + </record> |
4769 | + |
4770 | + <record id="tax_template_out_ipi25_refund_base_line" model="account.tax.line.template"> |
4771 | + <field name="code_type">base</field> |
4772 | + <field name="tax_amount">100</field> |
4773 | + <field name="amount">100</field> |
4774 | + <field name="apply_on">refund</field> |
4775 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4776 | + <field name="tax_id" ref="tax_template_out_ipi25"/> |
4777 | + </record> |
4778 | + |
4779 | + <record id="tax_template_out_ipi25_refund_tax_line" model="account.tax.line.template"> |
4780 | + <field name="code_type">tax</field> |
4781 | + <field name="tax_amount">25</field> |
4782 | + <field name="amount">25</field> |
4783 | + <field name="apply_on">refund</field> |
4784 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4785 | + <field name="account_id" ref="account_template_101050502"/> |
4786 | + <field name="tax_id" ref="tax_template_out_ipi25"/> |
4787 | + </record> |
4788 | + |
4789 | + <record id="tax_template_out_ipi27" model="account.tax.template"> |
4790 | + <field name="description">IPI 27%</field> |
4791 | + <field name="name">IPI Saída 27%</field> |
4792 | + <field name="amount">27</field> |
4793 | + <field name="type_tax_use">sale</field> |
4794 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4795 | + </record> |
4796 | + |
4797 | + <record id="tax_template_out_ipi27_invoice_base_line" model="account.tax.line.template"> |
4798 | + <field name="code_type">base</field> |
4799 | + <field name="tax_amount">100</field> |
4800 | + <field name="amount">100</field> |
4801 | + <field name="apply_on">invoice</field> |
4802 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4803 | + <field name="tax_id" ref="tax_template_out_ipi27"/> |
4804 | + </record> |
4805 | + |
4806 | + <record id="tax_template_out_ipi27_invoice_tax_line" model="account.tax.line.template"> |
4807 | + <field name="code_type">tax</field> |
4808 | + <field name="tax_amount">27</field> |
4809 | + <field name="amount">27</field> |
4810 | + <field name="apply_on">invoice</field> |
4811 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4812 | + <field name="account_id" ref="account_template_201010301"/> |
4813 | + <field name="tax_id" ref="tax_template_out_ipi27"/> |
4814 | + </record> |
4815 | + |
4816 | + <record id="tax_template_out_ipi27_refund_base_line" model="account.tax.line.template"> |
4817 | + <field name="code_type">base</field> |
4818 | + <field name="tax_amount">100</field> |
4819 | + <field name="amount">100</field> |
4820 | + <field name="apply_on">refund</field> |
4821 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4822 | + <field name="tax_id" ref="tax_template_out_ipi27"/> |
4823 | + </record> |
4824 | + |
4825 | + <record id="tax_template_out_ipi27_refund_tax_line" model="account.tax.line.template"> |
4826 | + <field name="code_type">tax</field> |
4827 | + <field name="tax_amount">27</field> |
4828 | + <field name="amount">27</field> |
4829 | + <field name="apply_on">refund</field> |
4830 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4831 | + <field name="account_id" ref="account_template_101050502"/> |
4832 | + <field name="tax_id" ref="tax_template_out_ipi27"/> |
4833 | + </record> |
4834 | + |
4835 | + <record id="tax_template_out_ipi30" model="account.tax.template"> |
4836 | + <field name="description">IPI 30%</field> |
4837 | + <field name="name">IPI Saída 30%</field> |
4838 | + <field name="amount">30</field> |
4839 | + <field name="type_tax_use">sale</field> |
4840 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4841 | + </record> |
4842 | + |
4843 | + <record id="tax_template_out_ipi30_invoice_base_line" model="account.tax.line.template"> |
4844 | + <field name="code_type">base</field> |
4845 | + <field name="tax_amount">100</field> |
4846 | + <field name="amount">100</field> |
4847 | + <field name="apply_on">invoice</field> |
4848 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4849 | + <field name="tax_id" ref="tax_template_out_ipi30"/> |
4850 | + </record> |
4851 | + |
4852 | + <record id="tax_template_out_ipi30_invoice_tax_line" model="account.tax.line.template"> |
4853 | + <field name="code_type">tax</field> |
4854 | + <field name="tax_amount">30</field> |
4855 | + <field name="amount">30</field> |
4856 | + <field name="apply_on">invoice</field> |
4857 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4858 | + <field name="account_id" ref="account_template_201010301"/> |
4859 | + <field name="tax_id" ref="tax_template_out_ipi30"/> |
4860 | + </record> |
4861 | + |
4862 | + <record id="tax_template_out_ipi30_refund_base_line" model="account.tax.line.template"> |
4863 | + <field name="code_type">base</field> |
4864 | + <field name="tax_amount">100</field> |
4865 | + <field name="amount">100</field> |
4866 | + <field name="apply_on">refund</field> |
4867 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4868 | + <field name="tax_id" ref="tax_template_out_ipi30"/> |
4869 | + </record> |
4870 | + |
4871 | + <record id="tax_template_out_ipi30_refund_tax_line" model="account.tax.line.template"> |
4872 | + <field name="code_type">tax</field> |
4873 | + <field name="tax_amount">30</field> |
4874 | + <field name="amount">30</field> |
4875 | + <field name="apply_on">refund</field> |
4876 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4877 | + <field name="account_id" ref="account_template_101050502"/> |
4878 | + <field name="tax_id" ref="tax_template_out_ipi30"/> |
4879 | + </record> |
4880 | + |
4881 | + <record id="tax_template_out_ipi35" model="account.tax.template"> |
4882 | + <field name="description">IPI 35%</field> |
4883 | + <field name="name">IPI Saída 35%</field> |
4884 | + <field name="amount">35</field> |
4885 | + <field name="type_tax_use">sale</field> |
4886 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4887 | + </record> |
4888 | + |
4889 | + <record id="tax_template_out_ipi35_invoice_base_line" model="account.tax.line.template"> |
4890 | + <field name="code_type">base</field> |
4891 | + <field name="tax_amount">100</field> |
4892 | + <field name="amount">100</field> |
4893 | + <field name="apply_on">invoice</field> |
4894 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4895 | + <field name="tax_id" ref="tax_template_out_ipi35"/> |
4896 | + </record> |
4897 | + |
4898 | + <record id="tax_template_out_ipi35_invoice_tax_line" model="account.tax.line.template"> |
4899 | + <field name="code_type">tax</field> |
4900 | + <field name="tax_amount">35</field> |
4901 | + <field name="amount">35</field> |
4902 | + <field name="apply_on">invoice</field> |
4903 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4904 | + <field name="account_id" ref="account_template_201010301"/> |
4905 | + <field name="tax_id" ref="tax_template_out_ipi"/> |
4906 | + </record> |
4907 | + |
4908 | + <record id="tax_template_out_ipi35_refund_base_line" model="account.tax.line.template"> |
4909 | + <field name="code_type">base</field> |
4910 | + <field name="tax_amount">100</field> |
4911 | + <field name="amount">100</field> |
4912 | + <field name="apply_on">refund</field> |
4913 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4914 | + <field name="tax_id" ref="tax_template_out_ipi35"/> |
4915 | + </record> |
4916 | + |
4917 | + <record id="tax_template_out_ipi35_refund_tax_line" model="account.tax.line.template"> |
4918 | + <field name="code_type">tax</field> |
4919 | + <field name="tax_amount">35</field> |
4920 | + <field name="amount">35</field> |
4921 | + <field name="apply_on">refund</field> |
4922 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4923 | + <field name="account_id" ref="account_template_101050502"/> |
4924 | + <field name="tax_id" ref="tax_template_out_ipi35"/> |
4925 | + </record> |
4926 | + |
4927 | + <record id="tax_template_out_ipi40" model="account.tax.template"> |
4928 | + <field name="description">IPI 40%</field> |
4929 | + <field name="name">IPI Saída 40%</field> |
4930 | + <field name="amount">40</field> |
4931 | + <field name="type_tax_use">sale</field> |
4932 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4933 | + </record> |
4934 | + |
4935 | + <record id="tax_template_out_ipi40_invoice_base_line" model="account.tax.line.template"> |
4936 | + <field name="code_type">base</field> |
4937 | + <field name="tax_amount">100</field> |
4938 | + <field name="amount">100</field> |
4939 | + <field name="apply_on">invoice</field> |
4940 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4941 | + <field name="tax_id" ref="tax_template_out_ipi40"/> |
4942 | + </record> |
4943 | + |
4944 | + <record id="tax_template_out_ipi40_invoice_tax_line" model="account.tax.line.template"> |
4945 | + <field name="code_type">tax</field> |
4946 | + <field name="tax_amount">40</field> |
4947 | + <field name="amount">40</field> |
4948 | + <field name="apply_on">invoice</field> |
4949 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4950 | + <field name="account_id" ref="account_template_201010301"/> |
4951 | + <field name="tax_id" ref="tax_template_out_ipi40"/> |
4952 | + </record> |
4953 | + |
4954 | + <record id="tax_template_out_ipi40_refund_base_line" model="account.tax.line.template"> |
4955 | + <field name="code_type">base</field> |
4956 | + <field name="tax_amount">100</field> |
4957 | + <field name="amount">100</field> |
4958 | + <field name="apply_on">refund</field> |
4959 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4960 | + <field name="tax_id" ref="tax_template_out_ipi40"/> |
4961 | + </record> |
4962 | + |
4963 | + <record id="tax_template_out_ipi40_refund_tax_line" model="account.tax.line.template"> |
4964 | + <field name="code_type">tax</field> |
4965 | + <field name="tax_amount">40</field> |
4966 | + <field name="amount">40</field> |
4967 | + <field name="apply_on">refund</field> |
4968 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4969 | + <field name="account_id" ref="account_template_101050502"/> |
4970 | + <field name="tax_id" ref="tax_template_out_ipi40"/> |
4971 | + </record> |
4972 | + |
4973 | + <record id="tax_template_out_ipi42" model="account.tax.template"> |
4974 | + <field name="description">IPI 42%</field> |
4975 | + <field name="name">IPI Saída 42%</field> |
4976 | + <field name="amount">42</field> |
4977 | + <field name="type_tax_use">sale</field> |
4978 | + <field ref="l10n_br_account_chart_template" name="chart_template_id"/> |
4979 | + </record> |
4980 | + |
4981 | + <record id="tax_template_out_ipi42_invoice_base_line" model="account.tax.line.template"> |
4982 | + <field name="code_type">base</field> |
4983 | + <field name="tax_amount">100</field> |
4984 | + <field name="amount">100</field> |
4985 | + <field name="apply_on">invoice</field> |
4986 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4987 | + <field name="tax_id" ref="tax_template_out_ipi42"/> |
4988 | + </record> |
4989 | + |
4990 | + <record id="tax_template_out_ipi42_invoice_tax_line" model="account.tax.line.template"> |
4991 | + <field name="code_type">tax</field> |
4992 | + <field name="tax_amount">42</field> |
4993 | + <field name="amount">42</field> |
4994 | + <field name="apply_on">invoice</field> |
4995 | + <field name="code_id" ref="tax_code_template_ipi"/> |
4996 | + <field name="account_id" ref="account_template_201010301"/> |
4997 | + <field name="tax_id" ref="tax_template_out_ipi42"/> |
4998 | + </record> |
4999 | + |
5000 | + <record id="tax_template_out_ipi42_refund_base_line" model="account.tax.line.template"> |
Turkesh.
Can you share the pad that explain changes on this MP?
It should be great to validate reasons and changes.
Good job dudes.... thanks for the great job.
Regards.