CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to inherit email.template function with the signature:
def generate_email_batch(self, cr, uid, template_id, res_ids, context=None, fields=None):
But when my custom function calls super fails, i think this is because the function not have ids and "fields" are after the context
my module code:
from openerp import models, fields, api
_inherit = 'email.template'
def generate_email_batch(self, res_ids, fields=None):
res = super(EmailTemplate,self).generate_email_batch(res_ids, fields)
if i change the signature of original function to:
def generate_email_batch(self, cr, uid, ids, res_ids=None, fields=None, context=None):
i have no problem to inherit in new api.
I'm doing something wrong or the new api can't inherit functions with the ids field with another name and field after context?
About This Community
Odoo Training Center
|Asked: 1/27/15, 5:10 AM|
|Seen: 2945 times|
|Last updated: 3/16/15, 8:10 AM|