← Back to team overview

openerp-community team mailing list archive

Re: CamelCase

 

All is said here.

OCA can have the full PEP8 standard.

+1

David BEAL
Akretion
OpenERP Development - Integration
+33 (0)6 67 22 86 89
+33 (0)4 82 53 84 60


2014-04-04 11:39 GMT+02:00 Pedro Manuel Baeza Romero <pedro.baeza@xxxxxxxxx>:
> I also support the change to CapWords (CamelCase), because we can consider
> consistency in multiple levels: you can be consistent across a file, a
> module or an entire project. There are several full modules already working
> with this convention (for example, account_statement_base_import module and
> family on bank-statement-reconcile branch). If we are changing progressively
> modules to this convention, we will be in a future near of the project level
> consistency, but at least on the module level.
>
> Take in mind also that this doesn't generate any side effect, because the
> name of the class is not so important for OpenERP (just for calls on Python
> code).
>
> We can put this as a requirement for new added modules, and desirable for
> existing ones.
>
> Regards.
>
>
> 2014-04-04 11:25 GMT+02:00 Stefan Rijnhart <stefan@xxxxxxxx>:
>
>> 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
>>
>> Cheers,
>> Stefan.
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openerp-community
>> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openerp-community
>> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>


References