Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-574806-msh into
lp:openobject-addons/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574806-msh/+merge/107016
Hello,
Fixed the issue of process color of the node which is not showing the color
properly, here states of the relational field were not checked, so if you have
given state to relational object in node, like in supplier invoice we have
given reference of the account.model_account_move model and checked
object.state=='posted' then this will not evaluated, only state of current
object that is account.invoice is evaluated.
Demo :- Put object.state=='posted' in Accounting node, as when you open the
supplier invoice at that time journal entries are posted, so the Accountig node
should be in red color, which is not working.
This branch will fix this issue.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-574806-msh/+merge/107016
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-574806-msh.
=== modified file 'account/process/supplier_invoice_process.xml'
--- account/process/supplier_invoice_process.xml 2011-01-14 00:11:01 +0000
+++ account/process/supplier_invoice_process.xml 2012-05-23 13:48:23 +0000
@@ -68,6 +68,7 @@
<field eval=""""Accounting"""" name="name"/>
<field eval=""""Accounting entries."""" name="note"/>
<field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
+ <field eval=""""object.state=='posted'"""" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
=== modified file 'process/process.py'
--- process/process.py 2011-10-16 01:28:00 +0000
+++ process/process.py 2012-05-23 13:48:23 +0000
@@ -118,6 +118,7 @@
data['active'] = False
data['gray'] = False
data['url'] = node.help_url
+ data['model_states'] = node.model_states
# get assosiated workflow
if data['model']:
@@ -198,6 +199,11 @@
resource['name'] = refobj.name_get(context)[0][1]
resource['perm'] = pool.get(ref_model).perm_read(cr, uid, [ref_id], context)[0]
+ ref_expr_context = Env(refobj, current_user)
+ try:
+ nodes[nid]['active'] = eval(nodes[nid]['model_states'], ref_expr_context)
+ except:
+ pass
for r in relatives:
node = nodes[r]
if 'res' not in node:
_______________________________________________
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