Merge lp:~openerp-dev/openobject-addons/6.1-opw-586838-acl into lp:openobject-addons/6.1

Proposed by Anaël Closson (openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-586838-acl
Merge into: lp:openobject-addons/6.1
Diff against target: 34 lines (+3/-3)
2 files modified
purchase/purchase_workflow.xml (+2/-2)
sale/sale_workflow.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-586838-acl
Reviewer Review Type Date Requested Status
Olivier Dony (Odoo) Pending
Review via email: mp+153314@code.launchpad.net

Description of the change

  Steps to reproduce:
   - create a purchase order
   - cancel the created invoice
   - receive products (PO state changed to approved even if still in invoice exception)
   - reset the invoice to draft => pay it

  The purchase order still is in approved state even if all subprocesses are done.

  You need to edit the view and modify the "manually corrected" button visibility to change the PO state to done.

To post a comment you must log in.
7180. By Anaël Closson (openerp)

[FIX] OPW 586838 sale order shipping exception overwriting invoice_exception and then sale order cannot reach done state
Steps to reproduce :
* Create a new sale order
* Create the associated invoice
* Cancel the invoice, reset to draft
* Cancel the picking

The sale order is now in picking exception which can be manually corrected, but this change the state to 'in progress' instead of 'invoice_except'.
The patch avoids shipping exception to erase invoice_exception state.
The opposite doesn't harm, as the scheduler will notice the shipping exception.

Unmerged revisions

7180. By Anaël Closson (openerp)

[FIX] OPW 586838 sale order shipping exception overwriting invoice_exception and then sale order cannot reach done state
Steps to reproduce :
* Create a new sale order
* Create the associated invoice
* Cancel the invoice, reset to draft
* Cancel the picking

The sale order is now in picking exception which can be manually corrected, but this change the state to 'in progress' instead of 'invoice_except'.
The patch avoids shipping exception to erase invoice_exception state.
The opposite doesn't harm, as the scheduler will notice the shipping exception.

7179. By Anaël Closson (openerp)

[FIX] OPW 586838 purchase orders cannot switch to state 'done' when invoice cancelled once

Steps to reproduce:
 - create a purchase order
 - cancel the created invoice
 - receive products (PO state changed to approved even if still in invoice exception)
 - reset the invoice to draft => pay it

The purchase order still is in approved state even if all subprocesses are done.

You need to edit the view and modify the "manually corrected" button visibility to change the PO state to done.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase/purchase_workflow.xml'
2--- purchase/purchase_workflow.xml 2011-11-09 11:49:08 +0000
3+++ purchase/purchase_workflow.xml 2013-03-14 15:19:25 +0000
4@@ -55,7 +55,7 @@
5 <record id="act_invoice_done" model="workflow.activity">
6 <field name="wkf_id" ref="purchase_order"/>
7 <field name="name">invoice_done</field>
8- <field name="action">write({'state':'approved'})</field>
9+ <field name="action">(state != 'except_shipping') and write({'state':'approved'})</field>
10 <field name="kind">function</field>
11 </record>
12 <record id="act_invoice_end" model="workflow.activity">
13@@ -72,7 +72,7 @@
14 <record id="act_picking_done" model="workflow.activity">
15 <field name="wkf_id" ref="purchase_order"/>
16 <field name="name">picking_done</field>
17- <field name="action">write({'shipped':1,'state':'approved'})</field>
18+ <field name="action">write({'shipped':1}) and (state != 'except_invoice') and write({'state':'approved'})</field>
19 <field name="kind">function</field>
20 <field name="signal_send">subflow.delivery_done</field>
21 </record>
22
23=== modified file 'sale/sale_workflow.xml'
24--- sale/sale_workflow.xml 2011-12-19 16:54:40 +0000
25+++ sale/sale_workflow.xml 2013-03-14 15:19:25 +0000
26@@ -94,7 +94,7 @@
27 <field name="wkf_id" ref="wkf_sale"/>
28 <field name="name">ship_except</field>
29 <field name="kind">function</field>
30- <field name="action">write({'state':'shipping_except'})</field>
31+ <field name="action">(state != 'invoice_except') and write({'state':'shipping_except'})</field>
32 </record>
33 <record id="act_ship_end" model="workflow.activity">
34 <field name="wkf_id" ref="wkf_sale"/>