Purpose of the task is, to use our awesome website builder instead of
pad when creating a website page for terms & condition.
Also suggest default T&C to save user time when user enable the feature
So in this commit did the below changes:
* Added new indicational text below "Terms as note" & "Terms as web page"
* After enabling "Term as web page', user should be able to see the
term page url
* For Terms editing:
- User that have 'website' or 'ecommerce' module should edit the page
directly using the website builder with link "edit in website builder" link.
- User that don't have nor website not ecommerce module should update
the text in the pad but in a pop-up window.
* Also added the dynamic default term for company when term type is html.
PS: changed website_sale pre_init_hook to post_init_hook because
invoice_terms_html is compute field which depends on term_type so
when term_type is changed from init_hook it will give the key error
for the invoice_terms_html as it's not loaded to registry.
closesodoo/odoo#68225
Taskid: 2414659
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit, the terms and conditions could not be html formatted text.
closesodoo/odoo#56512
Taskid: 2304199
Related: odoo/upgrade#1689
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, if the website's company was different than the user
company, the ecommerce would use the user's company instead of its own
pricelists.
Step to reproduce:
- Set company2 to website1
- Create a pricelist1 for company1 and a pricelist2 for company2
- With an user from company1, visit the website1.
- The pricelist used will be the one from the user, pricelist1 and not the
pricelist2 from company2 which is the website1 company.
This implements support to administer multiple websites. Although the
core functionality already existed, managing multiple websites was
fairly technical.
In the interest of database updates and migration this attempts to
keep duplicated data to a minimum. To do this the usual generic
records are rendered unless some website-specific record exists that
replaces it. Copy-on-write (COW) is used to create these
website-specific records. Through this mechanism creating a
website-specific record is delayed until necessary. A COW mechanism
has been implemented on 4 models: ir.ui.view, website.page,
website.menu and ir.attachment. These COW mechanisms are activated
when editing data through the website (aka frontend). These frontend
edits (e.g. with web_editor) will be website-specific, possibly
creating a website-specific record when necessary. When editing data
in the backend nothing special will happen, even when editing a
generic record. Note that because of this mechanism also facilitates
the ability to create new, uncustomized websites because the generic
data is kept.
Support is provided for a website to have any theme. Themes are fairly
complex to handle. Standalone themes can depend on other standalone
themes (e.g. theme_beauty depends on theme_loftspace) and themes
usually modify some data of the themes they depend on. Because a theme
can be installed on multiple websites, using website_id m2o fields
does not work well. It would require duplicate data, making updates
and migration harder. Because of this, data for themes (ir.ui.view and
ir.attachment specifically) have a theme_id m2o. website has a
theme_ids m2m that identifies all theme modules currently installed on
it. Through these fields we figure out what to render. A theme is only
fully uninstalled when it's no longer active on any website. The
advantage of this approach is that upgrading or migrating theme data
is no different from the single-website case.
The website.published.mixin class was modified to handle multiple
websites. A wizard was added in the backend to easily manage this for
multiple website.
Although not used anywhere in this commit, a 'website_id' variable has
been added in the evaluation context of ir.rule. It allows to easily
make any model multi-website aware, all that's needed is a custom
website_id m2o field on a model and a custom record rule.
Purpose
=======
Create one report where we can see all sales (sales from sales, eCommerce, POS) grouped by channels
Specification
=============
New Report Sales > Reports , the name should be "All Channels Sales Orders"
This report contains the following fields :
name
date
product_id
partner_id
company_id
user_id
price_total
pricelist_id
categ_id = product_categ_id
invoiced = amount to invoice
analytic_account_id
team_name
country_id
We thought about doing a kind of sale_order_common report, but we cannot re-use sale.report because of some field (qty_delivered, ...) that we cannot compute on pos orders.