openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #06968
Re: Suggestion for OCA conventions
On 10/19/2014 10:46 PM, Graeme Gellatly wrote:
> Hi,
>
> While having a sale order line modification in the same file as sale
> order makes some sense, these can become big files and it's nice to see
> them split, but then in addon modules maybe not. But for me this comes
> down to personal preference, not sure it needs to be a convention.
> Sometimes it makes sense to go one way, sometimes the other and usually
> I think it is fairly obvious. Often refactors are about moving
> functionality between models (e.g. call one write on parent, or create
> separate function in submodel) and I find it much easier when they are
> one file, but then sometimes two models are so closely related, e.g.
> product_template and product_product and so verbose that I find having
> them separated is easier. With wizards, normally the code is reasonably
> short and does a specific thing, so I put all models in one file for
> that wizard. But then again for the xml files I find myself in complete
> agreement. If you just did for xml you would know anyway the models
> affected. So maybe I'd like the rule for xml files, but for python
> files a bit more common sense. While it might be nice for the person
> looking at the list of files for the first time, I'd rather we gave
> preference to the people writing and maintaining the code and let them
> choose.
>
I totally agree with Graeme.
--
Guewen Baconnier
Business Solutions Software Developer
Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 39
Office: +41 21 619 10 10
http://www.camptocamp.com/
Follow ups
References