Odoo Python Class : use case for code in api v8, underscore lowercase notation for old api.
And Variable name use following classes and Api to given below.
use camelcase for model variable
use underscore lowercase notation for common variable.
since new API works with record or recordset instead of id list, don't suffix variable name with _id or _ids if they not contain id or list of id.
For example code is below..
class AccountInvoice(models.Model):
...
class account_invoice(osv.osv):
...
ResPartner = self.env['res.partner']
partners = ResPartner.browse(ids)
partner_id = partners[0].id
Note-use underscore lowercase notation for common variable.
0 Comment(s)