Hi, I have this sample code in my file procurement.py :
class procurement_order(models.Model):
_inherit = 'procurement.order'
analytic_account_id = fields.Many2one('account.analytic.account', string='Compte Analytique')
But i can't load my module on my server because there is this error :
AttributeError: 'module' object has no attribute 'Many2one'
Have you imported models at the top of your Python file? from openerp import models, fields, api
Yes, exactly with this : "from openerp import models, fields, api, _"
show us the file with import statement.