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,
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Nov 24
|
477 | ||
|
4
Feb 24
|
10164 | ||
sale / delivery
Solved
|
|
1
Jan 24
|
369 | |
|
0
May 23
|
831 | ||
|
4
Apr 23
|
38323 |