Closed Nick-OpusVL closed 4 years ago
Revoked for now
Re-opened.
I was going to move it into simple_request, but because there's nothing about that that suggests it always takes dbname as its second argument (even though within the class that is what happens), I decided against it. In other words all the usages might be the same only by coincidence, so we could break other usages of simple_request that might be used in other packages if I did that refactoring.
I think @JJ-OpusVL's review would be most useful here because he's been involved longer with the OOM so might foresee issues I can't. I'd also like to know if he agrees with my comment about things being "same by coincidence" because if we can confidently only change one common method that would be better from a DRY perspective. https://github.com/OpusVL/OpenERP-XMLRPC-Simple/pull/6#issuecomment-538360770
However I'd still like @PaulGWebster to read and accept this because he's the one (other than me)who's going to have to work with it into the future.
Approving this @PaulGWebster but let me know any retrospective thoughts if you have any, or raise a PR to fix anything you have problems with.
All-numeric database names where causing the following traceback from Odoo:
This is due to weak typing and the DWIMmy nature of RPC::XML.
No tests because I don't believe we're in a position to control the test database names that are created for testing purposes. In fact Test::MockOpenERP is written in Perl so we probably wouldn't be able to die in the same way when it's the wrong type anyway.
Not all modified methods tested, so please review very closely.