The field sales team is not used on lead when created from website.
We use the UTM (i.e. medium) instead to distinguish where the lead is created from.
This causes issues when people delete the Website Sales team. The
website_sale module already adds a salesteam_id to website, which is
configurable. So instead set that to website.salesteam_website_sales by
default and use this field.
Modified version of afc9507 after 8c31ecd:
website_crm doesn't look for the website_sale salesteam anymore
The website_crm module doesn't depend on website_sale, so the
salesteam_id field may not exist on website in contactus.
There is clearly a strange overlap with the website salesteam
between website_crm and website_sale, as indicated by the xml_id's.
The previous version didn't crash when the xml_id was not found,
though, while this one would always crash when you try to use
website_crm without website_sale, so I prefer to revert it.
A proper fix would be to set the salesteam at the level of the
website module, but I'm not sure it would make sense considering
that it wouldn't be used at all unless you happen to install one
of those two modules.
In the meantime, I'm reverting afc9507f3a.
This causes issues when people delete the Website Sales team. The
website_sale module already adds a salesteam_id to website, which is
configurable. So instead set that to website.salesteam_website_sales by
default and use it in both website_sale and website_crm.
- admin is not follower anymore of all leads created through the
contact form. The famous no_subscribe key is added in the context
for that purpose.
- fixed medium and sales_team of the contact form leads. A bad
xml_id + bad use of get_object_reference + bad use of try/catch
prevented from having any of those. It now works correctly
even if the medium and/or sales team has been deleted.
Courtesy of Use Merge: Yannick Tivisse.
Reviewed by Use Merge: Thibault Delavallée.
I think this commit message is waaaay longer than the commit
itself, although I think I will never beat Olivier or
Martin. Those two are able to write 3 pages of commit messages
when doing a one-line fix. Well, this fix can be tricky
to understand but, hey, I am not writing stupid things just to
gain some characters. Not my style.
Have a good day.
The old-api model._all_columns contains information about model._columns and
inherited columns. This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...
This commit contains the following changes:
- adapt several methods of BaseModel to use fields instead of columns and
_all_columns
- copy all semantic-free attributes of related fields from their source
- add attribute 'group_operator' on integer and float fields
- base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
payment_acquirer, share, website, website_crm, website_mail: simply use
_fields instead of _all_columns
- base, decimal_precision, website: adapt qweb rendering methods to use fields
instead of columns
Models renamings:
- crm.case.stage becomes crm.stage
- crm.case.section becomes crm.team
Model split:
crm.case.categ has been splitted into:
- crm.phonecall.tag
- crm.lead tag
- crm.claim.tag
- crm.helpdesk.tag
Models removal:
- crm.payment.mode
- crm.segmentation
- report.crm.case
Removal of the crm_profiling module
(all these refactorings have been done in order to ease new API
migrations)
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
also do some trivial cleanup/simplification of website_crm while at it:
* Initialize a dict directly via literal
* Use straightforward dict copy instead of whatever that convoluted crap was
* Use gencomp for set creation
* Lift a pair of keysets to the original dict creation
get argument are processed and set into input fields + hidden fields
save some datas from http headers
controller should save all the submitted vars
bzr revid: chm@openerp.com-20140310162626-libizyxlycvuwo7h