Before this commit, the python domain on sale.report would not get today's data
as it would do `date >= 2020-03-03`, but it means `2020-03-03 00:00:00`,
actually excluding today.
Then the JS domains to retrieve those data once you click on the metric (it
loads an act window with his domain + additional domain though js) would have
a different date domain, including today.
Note that there is still some inconsistencies between python and JS such as
last month filter which is in python (in template filter) today - 30 days
while in JS it is moment.subtract 1 month which might be 31 days.
X-original-commit: 23e65d70baf2444b35c81a10cdc09fee9d625c75
Act window domain are used to load tree view data when clicking on dashboard
metric.
That metric is retrieved through domain in backend.
This domain part wasn't adapted in act window domain (can't use ref).
As searching on website is enough to get ecommerce order, this line can be
safely removed, it is an old code that was needed before website_id was set on
order, as it can be noticed in f6fc7c2319.
X-original-commit: b31abe06583c06dfc8b0df047d2659e657785b89
Before this commit, if you don't have the sale access right, when you arrive on
main website menu, the dashboard try to load some utms data and will fail with
a traceback.
Now we don't render utm graph it you don't have the sale access right
This commit closesodoo/odoo#54695closesodoo/odoo#55801
X-original-commit: 8123bbc622dc21100828b1ab0bbe3cb4367b24b1
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Some library versions are outdated since the release of Debian Buster.
With this commit the required libraries versions will match as close as
possible the versions available in the current Debian stable release
(Buster).
Also, the requirements were tested against a Windows Python 3.7 to
ensure that a "pip install -r" can be used without the need of a CPP
compiler.
As Babel format_time now returns 'HNE' (Heure Normale de l'EST) for Fr
locale instead of the zone offset, the test is adapted.
Finally the babel.dates is explicitely imported, otherwise the proper
import of this submodule is relying on a side effect.
closesodoo/odoo#43106
X-original-commit: 32e455bf72980e6330871aa9cd99c26c6e1225d7
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
en_US may not be activated as it is possible to create a database in
another language using the database manager.
When trying to install a chart of account, the tax return entry tried
to format a date at the installation of the module, with no lang in
the context. The fallback was made on en_US but an error is raised if
that language is not activated.
As it is a very common scenario to retrieve a language from the
context, add a generic tool method to do it.
Replace and closesodoo/odoo#37629closesodoo/odoo#37568
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit it was no more possible to access website menu once
ecommerce installed, because the dashboard crashes with an
"Invalid field 'date_order' in leaf".
* pos_sale, sale, sale_crm, sale_management, sale_stock, website_sale
Purpose of this commit is replace the confirmation date field with
order date from sale. As order_date and confirmation_date of sale order
are having same value so no need to keep two fields, remove confirmation
field and instead use order date.
cretae_date use as order Date and replace the order_date on confirmation
of the order as confirmation date.
task-2027274
closes: #34571
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Reason:
*Sales team configuration is too complex with fields you
don't understand and that bring no added value
*Remove the team type, every team should be able to handle
a POS or a website for example
Contains:
*Removal of the team_type, use_quotations, use_leads fields
*Removal of the graph configuration fields
*Adapting the filters that were based on the team_type
*Clear distinction between the team dashboard behavior in crm
from the one in sales
*Cleansing of now dead code due to the removal of the previously
mentionned fields
Task: #1830105
Enterprise PR: #3006Closes: #28063
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.
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are
technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion
later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log
This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are
created/validated upon completion of transaction.
To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice
instead of the transactions.
Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
Was PR #24043
[FIX] add domain based on journal to payment tokens
Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
Purpose
=======
Sales graph should be based on confirmation_date of sales orders, not the date_order.
Date should be aggregated by product templates, not variants
Purpose: Add button to see the number of
abandoned carts and the ability to send
a recovery email to those customers.
On the abandoned carts menu, you can see
the SO from the website where no reminder
email has been sent.
By selecting them, you can send an email
to the customer to tell him there is still
a cart waiting.
Clicking on the link, he can reuse his old
cart or merge it with his current one.
An abandoned cart is a SO from a website
sales team, and created after a treshold
parametered by a 'delay' settings (number
of hours to be considered as abandoned).
Now, an abandonned cart is:
- a draft quotation
- in a sales channel with type = website
- with a customer set (not public user)
- created more than one hour ago
- removed from_website filter in search view of website sale, added domain in view for display website side sale
- use proper filter for display 'Orders' and 'Orders to Invoice' in dashboard
this commit closes#17383 task-745391
Abandoned carts are those with lines, not linked to public user, still
in draft mode and having more than one hour of lifetime.
By the way imp typo, abandonned abandoned one n.
* avoid searching on all available sale order when
computing transactions and apply access rights;
* use read_group on sale.report model to compute
total sold
This commit refactors the sales part of website dashboard. It introduces
to main features
* header of dashboard now contains buttons related to ecommerce orders
and payments. It allows to quickly jump to the related business views;
* graph and summary is updated to display more precise data about orders,
carts, abandoned carts, orders to invoices and payment status.
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.