Emails on Sale Order, Invoice, Recovery cart. When no sales on sale.order
use "COMPANY" <email of company> as fallback before the current user.
Reason is that odoobot is often used in automatized actions and having
it as email_from is not really user friendly.
Also add company fallback in auth modules email templates (if not already
using it) for the same reason.
Task-3346388
closesodoo/odoo#124472
X-original-commit: 597fc004148bf39e8f56e36e840aa6788872f237
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since Bootstrap 5, bg- classes behave differently. On the website
e-commerce shop the ribbon for the states "Sale, Sold out, Out of stock,
New!" still uses bg- classes therefore having the wrong text color by
default, making it difficult to read.
This commit fixes the default text color by using new bootstrap 5 class
text-bg-* instead of bg-*
task-3096035
closesodoo/odoo#118051
X-original-commit: e6ecb4f72e9610bd5e3f81264c8278fbb7a6d5a3
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
It's currently impossible to set fixed delivery costs in eCommerce
without installing Inventory. This is a problem for one-app free
instances on our SaaS, which would need to pay for a feature that
should be part of the basic eCommerce features bundle.
This commit makes it possible to define fixed-cost delivery methods in
eCommerce without installing Inventory by adding a direct dependency of
`website_sale` on `delivery`. The bridge between those two modules is
therefore included in the former.
Part-of: odoo/odoo#110686
Removes the constraint of using a pricelist and makes all sales flows
rely on the currency of the sale order (or repair order)
task-2735672
closesodoo/odoo#84920
Related: odoo/enterprise#24716
Related: odoo/upgrade#3642
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
Before this commit, some templates for the products snippet in website
had some layout issues. This commit fixes them.
task-3060991
closesodoo/odoo#105890
X-original-commit: e829b345f0f5e5346be416b8354c29fa9acb74a7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit improves the design of dynamic products templates.
It introduces templates using multiples rows and fine tunes the
design of the other ones.
To make thumbnails work in the template selector, an extra
data-attribute can now be processed by the snippet option.
- data-thumb: it references the location of the thumbnail for a
template. If present the option will show the svg / img.
If not it will display the name of the template.
task-2677203
Part-of: odoo/odoo#80128
Co-authored-by: Arthur Detroux <ard@odoo.com>
Allow our users to modify mail template more easily
- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage
In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.
Update master data to add description on some templates.
task-2944770
closesodoo/odoo#101730
X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
With this commit we replace the current way to show alternative
products with a new option on the dynamic snippets.
Instead of having alternative products show up on all products if the
option is enabled, it will now be on a per product (template that is) basis
using the dynamic product snippet.
TaskId-2695187
closesodoo/odoo#85189
Related: odoo/upgrade#3277
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Steps to reproduce:
- Take a product sold on the e-commerce and add taxes
- In the Website settings chose the product prices to be
shown tax-included
- Add the snippet "Products"
Problem:
The price shown on the snippet is tax-excluded while the
price shown on the product page is tax-included. The
price on the snippet should also be tax-included.
Explanation
Bug introduced by commit 9e99a9df46
using the _get_contextual_price ignored the option where the taxes
needed to be computed. To solve the issue we create a new function
that calls _get_contextual_price but also add the taxes if
necessary.
opw-2894461
closesodoo/odoo#96285
X-original-commit: a029aea6e332eca8abbc0591f8885afaaa223e75
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
After this commit clients will be able to select whether to display the add to cart button when the computed price of a product is 0.
This option will be available in the settings.
task-2694860
closesodoo/odoo#87952
Related: odoo/enterprise#27594
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
This commit adds hooks to give more flexibility on cart updates. It
allows to add parameters when a product is added to a cart. It gives a
method to disable the quick add and multiple hooks for further smooths
developments.
task-2382027
Purpose is to remove custom styling and use the 'Pay Now' notification layout.
Extra table is removed from template body (table with order name, 'sent by'
footer, ...) and only main content is kept. Some extra padding is removed.
Action now uses the 'Pay Now' email layout to add the access button, company
logo, footer, ... meaning it is now more standard.
An override of recipient groups and access button is also performed in order
to align header with email purpose. Link redirects to the /cart page (instead
of classic portal SO view for customers) and is labelled as 'Resume order'
(instead of 'Validate and Pay Order' used in portal).
Task-2712450 (Mail/Sale: Improve 'Pay Now' notification template)
Part-of: odoo/odoo#82167
Purpose
=======
The fields are not used, don't work correctly and there is a specific
report to generate the product prices according to the pricelist and
the ordered quantities
Prior to this commit, any add 2 cart would rerender the dynamic
snippet, making it flicker and in the case of the carousel, resetting
to page 1.
With this commit, only filters that require the snippet to reload will
do so.
task-2654924
X-original-commit: 7f84a10cc5ff7ba4c65c249dfb2fe546968e2a7c
Part-of: odoo/odoo#80867
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment
By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).
There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).
We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.
To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.
This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
(for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
in order to see only one at once
- a floating select input to switch visibility of a particular logical
branching
Task-27033
X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
Dyanmic filters uses ir.filters.
But domain is not exactly the same syntax.
e.g. time.strftime() vs context_today()
So we add a fake action_id to avoid to display these filters on each action
of this model into the backend.
task-2654131
closesodoo/odoo#77021
X-original-commit: f92cfa96b9337fce8451080bffd9b7e40bdedc0d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit adds new templates for the s_dynamic_snippet_products
and improves the current templates for a better reading of the product’s
title and a better management of space when the content have different
width.
Part of https://github.com/odoo/odoo/pull/75623
task-2602978
X-original-commit: 49bd79b0bdca76415780bdfa199195371c2692e5
Part-of: odoo/odoo#77153
Be safe when we check if data have has_dicounted_price set or not.
In case of sample e.g. in product snippet, it could be missing.
task-2641360
X-original-commit: 0e1d1d519b962476113ae8553f10f85b22561824
Part-of: odoo/odoo#76290
Now you can specify into the dynamic_filter_template the number of record to
use for desktop, mobile, and the number of record to fetch.
Some template have only sense to be shown with 1 record e.g. a full width.
Syntax:
Add on root element one or more of these attributes:
data-number-of-elements="2" -> number of record on Desktop
data-number-of-elements-sm="2" -> number of record on Mobile
data-number-of-elements-fetch="2" -> number of record to fetch
closesodoo/odoo#75662
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This module allows users to be notified by email when a product out of
stock comes back in stock. For that they can add it to their wishlist
and select the appropriate option.
We show out-of-stock warning in all case whatever the show availibility option.
You cannot custom you 'in stock' message ot free message.
Spec of Pde and Fp
Part of https://github.com/odoo/odoo/pull/68221
task-2458165
closesodoo/odoo#68221
Related: odoo/upgrade#2405
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Kersten Jeremy <jke@odoo.com>
Co-authored-by: Younn Olivier <yol@odoo.com>
Show discount on product for the dynamic product snippet. The discount is
displayed the same way it is for website_sale.product_item: the price with the
discount and the price without discount in red and strikethroughed next to the
other price. The discount is displayed for all the snippet templates displaying
a price: 'Add Product to Cart', 'Detailed Product' and 'Image with price'.
task-2519662
closesodoo/odoo#73059
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Right now, for notifications handled by odoo (which are being displayed on
discuss app / object chatter), few of the buttons have unexpected scroll
(mostly the CTAs that redirect to record / portal views) and ruins the UI.
This commit fixes the issue by improving such templates by using proper
paddings on the button.
TaskId:2518863
closesodoo/odoo#70083
Related: odoo/enterprise#18225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to have all mail template into a mail_template_data.xml file
when possible. It eases maintenance and update when having to work globally
on template records.
Also update some ``body_html`` declarations still using ``xml`` instead of
``html``.
Task ID-2534550 (Template usage improvement)
Task ID-2477164 (Composer mixin)
Prepares Task ID-27033 (QWeb in templates)
COM PR odoo/odoo#70889
ENT PR odoo/enterprise#18352
Before this commit the recently viewed products were handled differently
from the dynamic product snippet.
After this commit the dynamic product snippet supports the functionality
of the recently viewed products snippet:
- its template used to show each product
- its filter of displayed products
- its "Add to cart" feature (with the animation)
- its "Forget" feature (only applicable when viewing recently viewed)
Also added "Accessories" and "Recently Sold With" filterings.
Several kinds of filtering can be combined.
- Products can be restricted to a given category
- Pseudo categories for all products or current category can be used
- Products can be restricted to matching names
- Products can be obtained from one of the following:
- Newest
- Latest sold: ordered by descending frequency in last 8 orders
- Latest viewed
- Accessories (of the current product)
- Recently sold with (the current product)
Accessories and recently sold with are only available in product pages.
Also, generic templates have been considered useless and the whole
mechanism allowing them has been removed (this includes the
pre-rendering mechanism for the fields specified in the filter).
task-2453416
https://github.com/odoo/odoo/pull/65554
Call _get_filter_meta_data when needed instead to compute it only once and
give it from function to function, it is really trivial to compute and the
api of functions are simple from this way.
Avoid to use h4/h5 taf for styling bug use bootstrap feature for it.
The semantic of <div class='h4'/> vs <h4/> is not the same for SEO
Don't make call_to_action_url required
+ small typo
task-2446024
https://github.com/odoo/odoo/pull/65176
Before this commit the filtering code for the Dynamic Products snippet
was rendering all its values.
After this commit the filtering code for the Dynamic Products snippet
mostly returns the values to be rendered.
Because the list_price still needs to be rendered with the correct
currency, the general rendering mechanism is being informed through the
field meta-data that the escaping was already done.
task-2446024
https://github.com/odoo/odoo/pull/65176
Made the website_id non mandatory on website snippet filters and adapted
the fetching route so that it interprets an unspecified website_id as
the filter being available on any website.
Before this commit website snippet filters had to be limited to one
single website.
After this commit website snippet filters can be made available on all
websites by setting their website_id to no value (this is the new
default of the pre-defined filters).
https://github.com/odoo/odoo/pull/59831
task-2355369
closesodoo/odoo#59831
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Issue
To do on Community:
- Install website_sale (eCommerce)
- Go into Website app
- Navigate through Product/Products
- Edit 'Customizable Desk (CONFIG)' and add '&' and/or '<' and/or '>'
characters into the name
- Save
- Go to the Website app Dashboard and click on 'Go to Website'
- Click on 'Edit' button
- Drag and drop the 'Dynamic Product' snippet into the website
- Click on the block 'Your Dynamic Snippet wil be ...'
- In the right panel, in the 'Dynamic Product' snippet options,
chose a 'Template' and a 'Product Category'
A traceback is shown
Cause
the '&' character crashes lxml.etree.fromstring
Solution
ensure no '&' is sent to lxmx.etree.fromstring by using
odoo.tools.html_escape (in order to ensure no other problematic
characters are sent to the front) on the field values except when
not applicable (widget rendering with record_to_html should not be
escaped).
It is important to note here that this is applicable
to action servers that are used by the dynamic filter.
opw-2357027
closesodoo/odoo#59805
X-original-commit: f91422115c09be484f2868347566b6392ed0effd
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* Prior to this commit, images were only managed when being an image
field. No widget were used either.
* After this commit, image stored in model as url (as res.country.image_url)
can be used when specifying ':image' after the field name. The fields are
now rendered using their corresponding default widget. If there is a need
to force another widget and if the developer is sure that it is compatible,
he/she can specify it using the notation: 'field_name:widget_name'.
closesodoo/odoo#57645
X-original-commit: 18d4e3327c7152b4c3a86ba377e3357f213b703c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* Implement new snippets that allow the user to choose a filter
and a template.
Three snippets have been created:
- Dynamic Snippet: Displays the data in a grid format
- Dynamic Carousel: Displays the date in a carousel
- Dynamic Products: Let the user pick a product category and
displays the products in a carousel
task-2276740
PR #53175
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Purpose of the task is, we have added the activities on various
listviews, the goal of this task is to update SO/PO/invoice demo data
with activities and also set tags on sales orders.
So in this commit, We added the activity on several SO/PO/Invoices and
also added the some tags one sales order and set the user as False
where the user is set as 'Odoobot'.
closes odoo/odoo#51799
Taskid: 2254708
Closes: #51799
Related: odoo/enterprise#10743
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Previously, there was only one static "Sale" ribbon. Users might want to
have many types of ribbons, for different levels of sales, or to
indicate that a product is sold out. This commit lets the user create
custom ribbons and use them on prodcuts on the shop page. Additionally,
setting a ribbon on a product used to require a reload, this is no
longer the case. All ribbon modifications are stored in a cache and the
RPCs to put them into effect are only done on save.
task-1981170
Part of odoo/odoo#47574
Related: odoo/upgrade#1079
Related: odoo/design-themes#219
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Previously, the "Image full" option was on a per product basis. This is
very strange, because in most cases you either want all of your product
images to take up the entire card space, or none of them. This commit
makes the option into a global option for the shop page, so it can be
toggled for all products at once.
task-1981170
Part of odoo/odoo#47574
Sub categories were missing and will be usefull to test the incoming
enhanced categories filtering.
task-2071602
closesodoo/odoo#37297
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Website sale order confirmation email is broken by design. Indeed it has
jinja markers between html elements that do not allow them, like between
table and tr, between tr, ...
In this commit we completely rewrite the structure to correctly include
jinja markers where they are not moved or stripped by standard browsers
and editors.
Translations are updated accordingly as changing a mail template content
imply updating the whole body translation.
Followup of 74c5c00
website_sale: add website on some demo orders
Purpose is to showcase orders using website field, used notably for some
template rendering.
Forward port of afd173652214000ed and f74c86d448246b796d
closesodoo/odoo#48228
X-original-commit: d3bdb0a42eb052281b4652bf78e82b1c6c1c1d24
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE
Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case
* using the template in the composer on a single record: it is displayed
in the rendered template in the composer, meaning people could change it.
This behavior is interesting as it allows to see the email content;
* using the template in the composer in mass mail mode: it is not displayed
as only the raw jinja is displayed. It is therefore not obvious that it
will be appended to the body of the mail. People could add it manually and
have 2 signatures as a result;
A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.
Behavior will therefore be
* use a template -> specify signature usage in it manually through jinja;
* do not use a template -> signature added in sent emails;
SPECIFICATIONS
Remove user_signature.
Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.
Quickly clean some signature integration.
LINKS
Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761
Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
*: web_editor, website_crm, website_form_project,
website_hr_recruitment, website_sale
The form builder is now using the left panel option system. Many new
options are introduced to build better forms more quickly.
The tests are now running with the new website_form implementation.
Part of: https://github.com/odoo/odoo/pull/42189
task-2092425
closesodoo/odoo#42189
Related: odoo/enterprise#7365
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the cart recovery email displayed all lines of the order
After this commit, the email only shows relevant lines, that is
excluding deliveries for example
OPW 2072814
closesodoo/odoo#37025
X-original-commit: 234c3f56f4c03281f068981cd5af6bc8f5956334
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>