This function cannot be overridden in a model which inherit utm.mixin
Limitation by the heritage on AbstractModel
record_crm_lead.tracking_fields() will call tracking_fields() from module
utm.mixin (if not overridden on crm.lead) instead of the overridden method
from utm.mixin.
To force the call of overridden method, we use
self.pool['utm.mixin'].tracking_fields() which respects overridden
methods of utm.mixin, but will ignore overridden method on crm.lead
Eg:
class utm_mixin(osv.AbstractModel):
_name = 'utm.mixin'
def tracking_fields(self):
return "A"
class utm_mixin_overridden(osv.AbstractModel):
_inherit = 'utm.mixin'
def tracking_fields(self):
return "B"
class crm_lead(osv.osv):
_name = "crm.lead"
_inherit = ['utm.mixin']
def func_1(self):
print self.tracking_fields()
# print "A"
def func_2(self):
print self.pool['utm.mixin'].tracking_fields()
# print "B"
It's the dispatch method of ir_http which save GET parameters in cookies,
ignoring the overridden tracking_fields method in inherited model.
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
automatically in all countries thanks to Berne Convention + WTO rules,
and a reference to the applicable license is clear enough.
Remove old source_id
Use hr.recruitment.source to generate link with utm and create
alias with default value for utm
[FIX] crm/utm: Fix bug with utm (ddac26cdbb)
Move demo into data
Move ir_http to save the utm in the dispatch
This module tracks clicks in mass mailing mails and allow the generation of trackable links in a website interface.
Modules modifications
---------------------
Refractoring of the crm_tracking_* classes in a new module.
* Extract the crm_tracking_* from the crm module into a new module "utm"
* Remove the crm_mass_mailing bridge module
* New dependencies of mass_mailing and website_links to utm.