Rifakat Haradwala (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-bug-793468-rha into
lp:openobject-addons/6.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #793468 in OpenERP Addons: "error when mrp and module sale are installed"
https://bugs.launchpad.net/openobject-addons/+bug/793468
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-793468-rha/+merge/66746
sale: fix for action_invoice_create() getting called two times
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-793468-rha/+merge/66746
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-bug-793468-rha.
=== modified file 'sale/sale.py'
--- sale/sale.py 2011-05-17 11:44:45 +0000
+++ sale/sale.py 2011-07-04 05:44:32 +0000
@@ -612,6 +612,12 @@
res.append(line.procurement_id.id)
return res
+ def test_invoice(self, cr, uid, ids, *args):
+ for order in self.browse(cr, uid, ids, context={}):
+ if len(order.invoice_ids):
+ return False
+ return True
+
# if mode == 'finished':
# returns True if all lines are done, False otherwise
# if mode == 'canceled':
=== modified file 'sale/sale_workflow.xml'
--- sale/sale_workflow.xml 2011-01-14 00:11:01 +0000
+++ sale/sale_workflow.xml 2011-07-04 05:44:32 +0000
@@ -172,7 +172,7 @@
<record id="trans_wait_invoice_invoice" model="workflow.transition">
<field name="act_from" ref="act_wait_invoice"/>
<field name="act_to" ref="act_invoice"/>
- <field name="condition">(order_policy=='prepaid') or ((order_policy=='postpaid') and shipped)</field>
+ <field name="condition">(order_policy=='prepaid') or ((order_policy=='postpaid') and shipped and test_invoice())</field>
</record>
<record id="trans_wait_invoice_invoice_manual" model="workflow.transition">
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp