Similar to 186b599246321465eae937b875b6c970656b145a
opw-2229306
closesodoo/odoo#48873
X-original-commit: ac5f269fc514a041f51b5ad2039ac80b37f25abd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce:
-install website, website_partner, contacts and studio
-go to contacts and open any partner
-click the studio icon (top-right corner of the screen)
-add the 'website_description' field to the partner
Previous behavior:
the description field is not translatable and attempting to
change the "translatable" option in technical > fields spawns
an error
Current behavior:
the description field is translatable
opw-2155115
closesodoo/odoo#42043
X-original-commit: 186b599246321465eae937b875b6c970656b145a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Multi is the default api for methods, it is not necessary to explicitly
decorate methods with it, adds clutter and most people use it because
they see that the rest of the code uses it.
Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
Currently, res.partner has:
1. `website_id` field hardcoded in website module
2. `website_published` field from website `website.published.mixin` in
website_partner module.
At the end, the res.partner model has all the field of the mixin
`website.published.multi.mixin` without having the mixin.
As a result, we have all the multi-website fields but we don't have access to
the mixins methods & computes.
Now, we use the `website.published.multi.mixin` on res.partner in website
module even if `website_published` is not needed if website_partner is not
installed.
+ add tooltip to `website` field to prevent warning since 2 fields would have
the same label
closesodoo/odoo#29711
Slug and unslug API is now available in http_routing. Indeed there is no
link to any website or any reason to not support slufigied URLs when
website is not installed. A new unslug_url method is added as a tool
coming from an embedded method from website. Doing it allows to have all
slug related methods defined at the same point.
Support of slug and unslug in qweb rendering is also moved directly in
http_routing version of ir_ui_view instead of website inheritance. This
is done in order to keep things coherent.
Some code from website about ModelConverter is also moved. Indeed both
versions of ir_http uses some kind of placeholder to store the uid
when converting urls to python. This commit unifies it by using the
website one directly in base to simplify the override.
This commit also updates all module importing slug. Enterprise modules
will have to be updated, see related commit.
Before this commit when you edit a contact with the editor, you didn't see
the selected record before the save.
Now, you can edit a contact with the html editor.
We move the hacked field self (on res.partner) from website_partner to base.
2 bugs:
field and record was reversed in call
need to pass a browseRecord and not a dict, because we uses .env on it
This hack allow to use widget='contact' on the browse record
itself and not on a specific field from the browse record
Eg:
<div t-field="partner.self" t-options='{
"widget": "contact",
"fields": ["address", "phone"]
}'/>
- website_sale_delivery : set the field website_published into a stat button and set the form into a sheet
- payment : Payment acquirers unpublished by default, and website_published set into a stat button
- website_partner : res_partner unpublished by default, to avoid partners as “Plusbelle LaPoubelle” to be published on the prod (True Story)
- website_sale_delivery : Delivery method unpublished by default. Adapt the demo data to be published (to avoid breaking a test), and set the field website_published into a stat button.
For public-facing HTML content provided by the user,
`<style>` tags and `style` attributes should be stripped
automatically, as they can easily be abused to deface
pages for abusive users and spammers.
<style> tags were already stripped, the optional `strip_style`
for fields.html enables the automatic stripping of style
attributes.
This is opt-in because custom style attributes are still
desirable in trusted HTML fields.
Also added basic controllers on the partner model, allowing to see the public
page of a published partner (or all partners if website manager). The template
was already existing, but the controller was missing. It has been added.
[FIX] website_customer: fix the inheritance of view as the website group has been
removed in the parent view. Also added a breadcrumb fix.
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
Website related fields on res.partner are now located inside their own module, in website_partner.
This module is a dependency for other modules that previously (re)defined various website fields.
Next step is to refactor a bit those modules, but one thing at a time. All glory to the hypnotoad.
bzr revid: tde@openerp.com-20131002092309-jlov4j1v6s9r6jyk