Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make readonly field in OpenERP(Odoo) ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.75k
    Comment on it

    In readonly field first we have to go in .py file (python file)
    After that we have to decide where we want readonly field and then give attribute readonly to that field.
    See below python code in py file for reference : -

     class spartner(osv.osv):
        _inherit='sale.order'
        _columns={
                  'invoice_address':fields.many2one('info1' ,'invoice_address'),
                  'Delivery Address':fields.selection([('simple','simple'),('Extensiva','Extensiva')],'Delivery Address'),
                 'acd_name':fields.char("Name"),
                  'acd_address':fields.char("Address"),
                  'acd_city':fields.char("City"),
                  'adress':fields.char("Address"),
                  'state': fields.selection([
                                             ('draft', 'Draft Quotation'),
                                             ('apr', 'Approval'),
                                             ('Quotation', 'Quotation Sent '),
                                             ('sent', 'Quotation Sent'),
                                             ('cancel', 'Cancelled'),
                                             ('waiting_date', 'Waiting Schedule'),
                                             ('progress', 'Sales Order'),
                                             ('manual', 'Sale to Invoice'),
                                             ('invoice_except', 'Invoice Exception'),
                                             ('done', 'Done'),
                                             ], 'Status', readonly=True,
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: