For improved readability I suggest rewriting the state value line as
'state': 'structured' if line.invoice and line.invoice.reference_type !=
'none' else 'normal',
I don't know that part of the code to comment more on the MP.
--
https://code.launchpad.net/~openerp-community/openobject-addons/fix-1105067-account_payment_reference_type/+merge/144935
Your team OpenERP Community is subscribed to branch
lp:~openerp-community/openobject-addons/fix-1105067-account_payment_reference_type.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help : https://help.launchpad.net/ListHelp