[trunk] Can't confirm invoices when using sequences journal sequences

Bug #559094 reported by Borja López Soilán (NeoPolus)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

On trunk the invoices action_number method fails when using journal sequences:

The API of the ir.sequence.get_id method has changed on trunk and now requires the test paremeter to be 'code' or 'id':
    def get_id(self, cr, uid, sequence_id, test='id', context=None):
        assert test in ('code','id')

But on account /invoice.py the old API is used (test parameter is "id=%s"):
   number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id=%s', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})

It should be like this instead:
   number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id})

By the way, we should take the opportunity and fix also this bug:
https://bugs.launchpad.net/openobject-addons/+bug/509204
and this bug:
https://bugs.launchpad.net/openobject-addons/+bug/507454
Both being related with the invoices sequences.

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote :

I'm adding a patch that solves bug 559094, bug 509204 and bug 507454 on the trunk version. (Note: based on previous work from Ferdinand @ ChriCar)

Can somebody give it a look (and apply it on the trunk)?

affects: openobject-server → openobject-addons
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Borja López Soilán (Pexego),

With the latest improvements taken place in trunk things are being handled in a different manner.

action_number() no more breaks with journal sequences.

Would you please give it a look so that we can close the bug?

However, please let us know if there are any issues to regarding this.

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello experts,

Things have been corrected by a different approach.

Thanks.

Changed in openobject-addons:
status: New → Fix Released
milestone: none → 6.0
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.