← Back to team overview

savoirfairelinux-openerp team mailing list archive

Re: lp:~savoirfairelinux-openerp/banking-addons/loose-coupling into lp:banking-addons/bank-statement-reconcile-7.0

 

> And I do not see the point of adding return True to functions where this does
> not have any meaning:
> if a function contains (or detects) errors, it should throw an exception. No
> exception thrown means function did the work it was supposed to do.

That's related to the XML/RPC API of OpenERP.
OpenERP considers that all the public methods are accessible from the XML/RPC service, all public methods should have a return value that is valid for XML/RPC. As XML/RPC forbids None values, usually a True / False value is returned.

I see 2 figures:
 - if a method should be accessible from XML/RPC, it should never return None
 - if not, it should be declared private (prefixed with _) and does not need to return anything if it does not make sense.

-- 
https://code.launchpad.net/~savoirfairelinux-openerp/banking-addons/loose-coupling/+merge/185033
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/banking-addons/loose-coupling.


References