Community mailing list archives
Re: Unexpected diffrences between Odoo Enterprise and Odoo Community interfacesby
Vauxoo S.A. de C.V., Nhomar Hernandez
On Sat, Apr 23, 2016 at 2:42 PM, Jerome Sonnet <firstname.lastname@example.org> wrote:
Can you be more specific as why my design is wrong ? Google provides a JS API that works quite well and I don't see why I should go through the server in order to do this ? I am actually using the ir_attachement ORM, but when I do have to URL and the name to use, see .
Basically (IMHO it is a matter of PoV not Wrong and Good).
gdrive has a python api which is part of the official dependencies also:
Then if I understand correctly, your module want to save always attachments on gdrive (given some proper IF statements), why did not you simply overwrite on python sime 6 lines of code per CRUD element on server side?:
1.- ORM will secur for you the relation with the attachment.
2.- NO parallel processing with different logic than the ORM itself.
3.- 0 js code ;-)
Then it is a matter of perspective but to give a proper behavior of what you describe in your descriptor (which sound nice) I think the correct approach is overwrite properlly the core methods ot impact ocnssitently 100% of attachments features....
Read the doc of those methods IMHO the talk by themselves.
You can see a fairly simple implementation but using S3 from amazon here:
It needs refactor for v9 and some proper configuration interfaces and more pythonistic code but technically it is a clean implementation.