Odoo Help

3

Jignesh Mehta

--Jignesh Mehta--
3110
| 6 5 8
Surat, India
--Jignesh Mehta--

- I have 3+ years of Industry Experience, specializing Odoo Development, Analysis, Customization, Implementation, Integration.
- I have done many Customization modules in Sale, Purchase, Point of Sale, Inventory, CRM and much more. Also Worked in the Odoo Themes like Business Theme or E-Commerce Theme.
- Develop Jewelery Manufacturing process from Scratch. It have more than 10 Department. Develop PDF and Excel reports for this project around 150 per format.

Jignesh Mehta
On 5/4/16, 9:15 AM

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,

0

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--

1239
| 6 5 6
Baroda, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 5/4/16, 11:08 AM

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,

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 5/4/16, 5:15 AM
Seen: 700 times
Last updated: 5/11/16, 8:24 AM