Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hello Vijay,
Inherit the sale Order and replace the partner_id field without attrs.
Try this (In your custom module) :-
class SaleOrder(models.Model):
_inherit = "sale.order"
partner_id = fields.Many2one('res.partner', string='Customer', required=True, track_visibility='always')
Hope this will works for you.
Thanks,
Dear Vijay,
Please use below code.
class sale_order(osv.Model):
_inherit = 'sale.order'
_columns = {
'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)], 'manual':[('readonly', False)], 'progress': [('readonly', False)]}, required=True, change_default=True, select=True, track_visibility='always'),
}
Hope this help for you !!!
Cheers,