Merge lp:~therp-nl/openobject-addons/7.0-lp1168948-set_tax_code_sequence_from_template into lp:openobject-addons/7.0

Proposed by Stefan Rijnhart (Opener)
Status: Rejected
Rejected by: Martin Trigaux (OpenERP)
Proposed branch: lp:~therp-nl/openobject-addons/7.0-lp1168948-set_tax_code_sequence_from_template
Merge into: lp:openobject-addons/7.0
Diff against target: 23 lines (+6/-0)
1 file modified
account/account.py (+6/-0)
To merge this branch: bzr merge lp:~therp-nl/openobject-addons/7.0-lp1168948-set_tax_code_sequence_from_template
Reviewer Review Type Date Requested Status
Stéphane Bidoul (Acsone) (community) Approve
Martin Trigaux (OpenERP) (community) Disapprove
Fabien (Open ERP) Needs Information
Review via email: mp+158816@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I have the feeling that it's simpler to have only one field (code and not sequence), but I do not know all the countries. So, the right merge would be to remove 'sequence' and keep the order by "code".

But I am not sure about this as I don't know all the countries.

To decide on the best approach, we should review account.tax.code structure of existing l10n_... modules to check if there are an example where it's worth having a sequence that does not satisfy the "order by code".

But, for sure, there is a bug, because 1/ order used in reports should come from templates (that was the intent of your fix I guess) and 2/ it's not normal to have a specific order in the report and another one in the screen (_order) which is impossible to understand for a end-user perspective.

review: Needs Information
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Rejected as adding a new field. If you believe this is required, please submit a merge proposal in trunk.

Regards

review: Disapprove
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

Hi,

I confirm that order by code is not sufficient for l10n_lu.

I'll submit a pull requestion on github master.

-sbi

review: Approve
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Fixed in 8.0 in github at 5df99ce with a derived patch, cfr https://github.com/odoo/odoo/pull/759

Unmerged revisions

9013. By Stefan Rijnhart (Opener)

[FIX] Set tax code sequence from template

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2013-04-04 09:09:48 +0000
3+++ account/account.py 2013-04-14 19:44:24 +0000
4@@ -2717,6 +2717,11 @@
5 'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Child Codes'),
6 'sign': fields.float('Sign For Parent', required=True),
7 '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."),
8+ 'sequence': fields.integer(
9+ 'Sequence', help=(
10+ "Determine the display order in the report 'Accounting "
11+ "\ Reporting \ Generic Reporting \ Taxes \ Taxes Report'"),
12+ ),
13 }
14
15 _defaults = {
16@@ -2749,6 +2754,7 @@
17 'parent_id': tax_code_template.parent_id and ((tax_code_template.parent_id.id in tax_code_template_ref) and tax_code_template_ref[tax_code_template.parent_id.id]) or False,
18 'company_id': company_id,
19 'sign': tax_code_template.sign,
20+ 'sequence': tax_code_template.sequence,
21 }
22 #check if this tax code already exists
23 rec_list = obj_tax_code.search(cr, uid, [('name', '=', vals['name']),('code', '=', vals['code']),('company_id', '=', vals['company_id'])], context=context)