Odoo Help

0
11 Answers
0
Avatar

Med Said BARA

--Med Said BARA--

2824
| 5 5 7
الجزائر
--Med Said BARA--
Med Said BARA
8‏/5‏/2014 8:42 ص

OK, you can hide your code

SupCal DescField

  "name_id"': fields.many2one('res.partner.name', 'Customer Name'),

Don't forget to add:

   _inherit = 'res.partner'

You can also add:

   domain="[('customer','=',True)]"

to get only the Customers Partners

Code posted by Sneha (modified)

 class warranty_warranty(osv.Model):

      _name = 'warranty.warranty'

      _inherit = 'res.partner'

_columns = {
     "name_id"': fields.many2one('res.partner.name', 'Customer Name', domain="[('customer','=',True)]" ),

     'contract':fields.many2one('account.analytic.account','Contract'),

     'batch_no':fields.char('Batch No.'),

     'status':fields.selection([('open','Open'),('close','Close')],'Warranty Status'),

     'serial_no':fields.char('Serial No.'),

     'notes':fields.text('Details'),

     'line_ids': fields.one2many('order.line','ordr_id',"PREVENTIVE MAINTENANCE"),


  }

     warranty_warranty()

Test this code, and let me know if it works.

3 Comments
sneha antony
9‏/5‏/2014 9:00 ص

Can you be a bit descriptive?I am not clear with the changes to be made

sneha antony
10‏/5‏/2014 3:15 ص

I tried using the above code.then restarted the sever.But still the warranty alerts are configured on the basis of serial number

sneha antony
10‏/5‏/2014 8:37 ص

Is there any any solution?I think the drop down of the description field is showing all the fields with 'char' field type.What if I change the code like this? 'description_field_id':fields.many2one('ir.model.fields','Description Field',domain="[('model_id','=',name),('ttype','=','char')]"),

-1
Avatar

IT Libertas

--IT Libertas--
988
| 4 3 7
Saint Petersburg, الإتّحاد الروسي
--IT Libertas--

Visit us: https://odootools.com/

IT Libertas is a team of developers and automation experts to help you to unlock Odoo ERP system's potential. We have been communicating with end users to whom the software became a main business tool since 2012. As a result, we are proud of dozens of successful Odoo apps developed.

We are open for new ideas and challenges to create the best Odoo tools for business needs all over the world

IT Libertas
3‏/7‏/2016 8:54 ص

The app https://apps.odoo.com/apps/modules/9.0/joint_calendar/ let you make any sort of alarms including notifications and emails

Ask a Question
Writer
Keep Informed
1 follower(s)
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