error when mrp and module sale are installed

Bug #793468 reported by Sébastien BEAU - http://www.akretion.com
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Committed
Low
OpenERP Publisher's Warranty Team

Bug Description

Hi
I found a very strange bug when the module mrp and sale are installed on the same database.
As my customer have an OPW (M10120866-mzcusrpk), I also send a mail to the support with a link on this bug.
To reproduce it:
add a print function in sale.py just after the fuction action_invoice_create

     def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None):
+ print "create invoice"
         res = False
         invoices = {}
         invoice_ids = []

Now start OpenERP and install the module mrp and sale (with demo data)

Go in sale and select the order SO001 of agrolait.
Change the invoice policy to "Invoice On Order After Delivery"
And validate the order and the picking.
=> look in the log, the function action_create_invoice was call one time. Everything work

Go back in sale order and duplicate the order SO001
Change the invoice policy to "Shipping & Manual Invoice"
And validate the order and the picking
=> everything is ok

Go back in sale order and duplicate the order SO001
Change the invoice policy to "Invoice On Order After Delivery"
And validate the order and the picking
=> look in the log the function action_create_invoice was call two time.

As we inherit this function in base_sale_multichannel (a required module for magentoerpconnect).
It's a big problem for our customer.

For information I use the last code of the addons and the server. This bug is very strange but 100% reproductible.

Thanks

Tags: maintenance
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
tags: added: maintenance
Changed in openobject-addons:
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hello Sébastien BEAU - http://www.akretion.com,

Thank you very much for reporting this problem.

It is now fixed in,
lp:~openerp-dev/openobject-addons/6.0-bug-793468-rha
Revision ID: <email address hidden>
Revision no: 4689

Regards,
Rifakat

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

Hello Rifakatat
Sorry to looking it just now
It's look like you forget to push the change in the branch before merging it (there is no code diff and the rev 4689 doesn't exist).
I attach the patch sent by email by Priyesh, so you can merge it.
This patch is working for me.

Thanks

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello Rikafat,

Do you have done an "uncommit" on your branch ?

On our OPW you sent me your branch (lp:~openerp-dev/openobject-addons/6.0-bug-793468-rha) with revision 4689 and this revision was there. But it disappeared.

The revision 4689 was the file attached, so the fix is not the same as the Sébastien's one !

What's the good patch to use please ?

Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

Oups sorry I don't post the right path. The path I send was the first patch taht priyest send my, and it was not working.
The correct patch is the patch send by Gueween. I used the same for my customer.
So merge the patch 4689 revision.
Sorry again

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Hello Sébastien, Guewen,

Sorry for the inconvenience caused.

The very same changes of revision 4689 (attached patch in #3 ) of the previous branch has been pushed into this branch,
lp:~openerp-dev/openobject-addons/6.0-bug-793468-rha1
Revision: 4776

Best regards.

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Thanks Rikafat, sorry for my panic :-)

Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

Thanks Rikafat

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.