On 04/04/2014 11:25, Stefan Rijnhart wrote: > On 04/04/2014 11:05 AM, Sebastien Beau wrote: >> Hi All, >> I always hesitate to move or not on CamelCase for every class in OCA >> module. >> I prefer CamelCase but a lot of code do not use it. >> And sometime not using CamelCase can introduce bug and you have to >> rename the class in something different like >> here >> https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-change-class-name-to-avoid-error_rde/+merge/213881 >> <https://code.launchpad.net/%7Ecamptocamp/carriers-deliveries/7.0-change-class-name-to-avoid-error_rde/+merge/213881> >> >> Maybe it's time to move on CamelCase and update the great Nicolas >> Bessi tools to check the class name >> (https://github.com/nbessi/openerp-conventions)? >> >> What do you think? >> > +1, especially as OpenERP core code seems to be moving towards this. > From some of the new modules in trunk addons: > > website_blog/models/website_blog.py:class Blog > website_blog/models/website_blog.py:class BlogTag > website_blog/models/website_blog.py:class BlogPost > website_blog/models/website_blog.py:class BlogPostHistory > website_crm_partner_assign/models/website.py:class Website > website_event_sale/models/website.py:class Website > website_mail/models/mail_thread.py:class MailThread > website_mail/models/mail_message.py:class MailMessage > website_mail/models/email_template.py:class EmailTemplate > website_partner/models/website.py:class Website > website_partner/models/res_partner.py:class WebsiteResPartner > website_partner/models/res_company.py:class WebsiteResCompany > website_sale/models/website.py:class Website > website_sale/models/payment_transaction.py:class PaymentTransaction > website_sale/models/sale_order.py:class SaleOrder > website_sale/models/sale_order.py:class SaleOrderLine > website_sale_crm/models/website.py:class Website > website_sale_delivery/models/website.py:class Website > website_sale_delivery/models/sale_order.py:class SaleOrder > >
Missed this. <rant>I really wish the core team of OpenERP would make clear moves with regard to coding conventions, especially those who have very little negative impact (as it is rare to import a Model class in an addon, and migrating to v8 means changing code anyway for community addons). There is still code in trunk using osv.osv as the base class, and the resulting inconsistencies make the life of everyone more incomfortable than it should. </rant> This being said, and with the move pointed out by Stefan in mind, I change my previous vote to +1 for changing this in OCA addons. -- Alexandre Fayolle Chef de Projet Tel : + 33 (0)4 79 26 57 94 Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac Cedex http://www.camptocamp.com _______________________________________________ Mailing list: https://launchpad.net/~openerp-community Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-community More help : https://help.launchpad.net/ListHelp

