[6.0.2] Accounting - Invoices: line items with account input do not use fiscal position

Bug #805262 reported by Bernard Renier - ADN
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Hello,

When creating an invoice, it inherits partner's fiscal position that should drive fiscal position on invoice form, especially on taxes.

Then you have two choices for defining invoice's line items content:

- Based on a product
- based on direct account input

Here is the issue:
- When selecting a product, the fiscal position applies automatically to tax (in my case,which is is very common, VAT tax is interpreted from local to intra EU due to to the fact that parter is a EU member). This behaviour is the right one.

- When I do not use a product but directly an account code instead, the tax I use is not interpreted by the partner's fiscal position (so in my example, it continues to use the local VAT instead of EU one inherited from fiscal position).

I had no deep look on code but it seems that the "on change" is only on product field while it should be on both product and account fields.

Regards,

Bernard

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Bernard,

I have tested your scenario at my end with the latest code. But I did not faced any problem as in
bug specification and all works fine at my end.

When I do not use a product but directly an account code instead, the tax I use is interpreted by the partner's fiscal position (so its not continues to use the local VAT instead of EU one inherited from fiscal position)

Would you please try again and notify us.

Thanks,
ara

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Bernard,

I have checked this issue again with latest updated code and did not face this issue now. Inside the code we already defined the related onchange code of account in invoice line object. You can check the onchange in following code of invoice py file:
    #
    # Set the tax field according to the account and the fiscal position
    #
    def onchange_account_id(self, cr, uid, ids, fposition_id, account_id):
        if not account_id:
            return {}
        taxes = self.pool.get('account.account').browse(cr, uid, account_id).tax_ids
        fpos = fposition_id and self.pool.get('account.fiscal.position').browse(cr, uid, fposition_id) or False
        res = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
        return {'value':{'invoice_line_tax_id': res}}

Here we are considering the fiscal position. Even I have checked this with different test cases.
Currently I am closing this bug. You can reopen this with reproducible steps or video.

Thanks.

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → nobody
importance: Medium → Undecided
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.