Odoo Help

0

Configure alerts in SuperCalendar on the basis of Customer name

By
sneha antony
on 5/8/14, 2:16 AM 1,410 views

I want to configure alerts in the supercalendar for the warranty ending date.Warranty is the module which I have created for my purpose.The module have the model warranty.warranty,with options to select Customer Name,Warranty Start Date and Warranty End Date,Warranty Period,Details of warranty product,Serial No.,Batch No. etc.I have configured in Configurators using following data. Model : warranty.warranty . Description Type : Field. Description Field : Serial No. Description : Warranty Expiration . Start date field : Warranty To (Warranty End Date).

Now the issue is when the warranty end dates are configured in the super Calendar they are listed on the basis of Serial No. only instead I want them to be alerted on the basis of the respective Customer Name.The Description Field combo in which Serial No . have been selected have only 3 items in the menu Serial No,Batch No and Warranty Period.What is the solution for this issue so that I can get the Customer name instead of Serial no/batch no.?

Could you post the part of your code where the fields are defined ?

Med Said BARA
on 5/8/14, 7:51 AM

i didnt get you?which portion of the code do i need to post?

sneha antony
on 5/8/14, 8:00 AM

Where the FIELDS are defined: "Customer Name,Warranty Start Date and Warranty End Date,Warranty Period,Details of warranty product,Serial No.,Batch No. "

Med Said BARA
on 5/8/14, 8:11 AM

ok.Some are defined as base fields and the rest as Custom fields.

sneha antony
on 5/8/14, 8:20 AM

Customer Name,Serial No.,Batch No are defined as base field in class warranty.warranty and the others are defined as custom fields.

sneha antony
on 5/8/14, 9:13 AM

class warranty_warranty(osv.osv):

_name = 'warranty.warranty'

_columns = {
    'name':fields.many2one('res.partner','Customer Name'),
    '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()
sneha antony
on 5/8/14, 9:14 AM
0

Med Said BARA

--Med Said BARA--
2714
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 5/8/14, 8:42 AM

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.

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

sneha antony
on 5/9/14, 9:00 AM

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
on 5/10/14, 3:15 AM

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')]"),

sneha antony
on 5/10/14, 8:37 AM
-1
IT Libertas
On 7/3/16, 8:54 AM

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

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/8/14, 2:16 AM
Seen: 1410 times
Last updated: 3/8/17, 1:48 AM