This commit adapts the business code in which
class/module/function/method redefinition took place so that it no
longer happens and the pylint test passes.
* = base_setup, website_form, website_sale, website_crm,
crm_iap_lead_website, website_hr_recruitment, website_mass_mailing
Integrate reCaptchaV3 on website_form submit and website_mass_mailing
subscription.
You can now use ReCaptchaV3 to add reCaptcha verification in any module
using google_recaptcha.
Also added a better error management on the form with custom messages.
task-2217980
closesodoo/odoo#48466
Related: odoo/enterprise#9649
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Steps to reproduce:
- install website, crm
- go to crm > settings > activate leads
- add a contact form to your website and submit
- go to the created lead
Previous behavior:
state_id is shown as false when geoip data is empty
Current behavior:
state_id is not shown if geoip is if the state found in geoip
does not not exist on the Odoo instance
opw-2218498
closesodoo/odoo#50055
X-original-commit: eba0eafac78adb498f8062f3490cea0847ed7927
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
This commit fixes the insert_record override where, after calling super,
the visitor is linked a lead with the id got from result, no matter if the
model is lead or not.
This commit adds the check to apply the link between visitor and lead only if
the current model is crm.lead.
Task ID: 2179631
PR #43731closesodoo/odoo#43814
X-original-commit: 37d4fa4385c6c98bff6b5adc7b6aa0ee325c49eb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since introduction of website_visitor,
we don't need to identifiy the lead with a lead_id cookie.
The visitor is identified and if a lead is created with the
contact form, the lead is created and linked to the visitor.
To avoid losing data, each time a visitor send a contact form,
it creates a new lead. All those leads are linked between them
via the website_visitor.
As the website_visitor already has the lang set on itself,
there is no reason to keep the lang_id of crm_lead at enterprise
side. So that lang_id on crm.lead has been moved to community.
This commit is directly linked to another one in enterprise
See https://github.com/odoo/enterprise/pull/4834 to get more details.
Task ID : 2028059
PR #34624
If a website_visitor submit a contact form (and becomes a lead),
the website_visitor is linked to the crm.lead.
the website visitor name is than adapted to match the name of
the first crm.lead linked to the visitor, ONLY if the visitor doesn't
already have a res.partner.
A visitor can have multiple crm.lead as he can send multiple
contact form and create multiple leads.
Task ID: 34624
PR #2028059
Website crm phone validation does not hold code that cannot be located in
website_crm as dependencies are now the same. Let us merge those two
modules !
Linked to task 2033777
closesodoo/odoo#34744
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In a mutli-company account with multiple websites for the
differents companies, the 'contact us' form creates leads in the
company of the admin instead of the one linked to the website.
This PR corrects that behavior by setting a 'company_id' field
to the company_id of the user in case that field is missing on
models that require it.
opw-1907375
closesodoo/odoo#28749
Before this commit, when you had a lead coming from your website form, you
had no informations from where it was located.
It was especially painful for USA which should add customer their location to
know their timezone and know at which time they could call him.
Now, the state code is added to the created lead. It is easy to figure what
timezone the user is on without contacting him first to ask.
This closes#20424
task-29784
This is linked to the previous commit.
This commit adapts the widget extension and backend controller of
the website admin dashboard to prevent a crash if the user does not
have sales rights.
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