Commit Graph
28 Commits
Author SHA1 Message Date
Romain Derie 8ea18f2270 [FIX] website_sale: align dashboard data
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
2020-11-18 12:55:17 +00:00
Romain Derie 0bce015cb4 [FIX] website_sale: align domain from route and act window
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
2020-11-18 12:55:15 +00:00
Jeremy Kersten 5a006327b4 [FIX] website_sale: fix tb on dashboard when no sale access
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 closes odoo/odoo#54695

closes odoo/odoo#55801

X-original-commit: 8123bbc622dc21100828b1ab0bbe3cb4367b24b1
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-12 10:47:20 +00:00
Christophe Monniez 29f02a37f0 [FIX] requirements: update library versions to match Debian Buster
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.

closes odoo/odoo#43106

X-original-commit: 32e455bf72980e6330871aa9cd99c26c6e1225d7
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-01-10 09:55:58 +00:00
wan 63de98b9b4 [FIX] *: remove en_US as fallback for lang code
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 closes odoo/odoo#37629

closes odoo/odoo#37568

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-01 10:05:17 +00:00
Jeremy Kersten 1067767e2a [FIX] website_sale: rename date_order/date
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".
2019-08-14 12:05:12 +00:00
Hetashree Chauhan 0cc30bf083 [IMP] sale(_*): replace confirmation date with order date
* 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>
2019-08-13 09:40:12 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Rishabh Jadia 1e3310d923 [MOV] website_sale: removed the website_sale_link_tracker module and moved it to the website_sale.
Task Id #1929272
2019-04-30 04:55:20 +00:00
qmo-odoo 1da63f0ab0 [IMP] salesteam: Simplify sales team config and improved team dashboard
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: #3006
Closes: #28063
2018-12-05 15:32:53 +00:00
Jeremy KerstenandDerie Romain ff26b20a48 [REF] website: small diff pep, renaming, make generic function
This commit should not change the behaviour in most cases.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 19:51:17 +02:00
Joren Van Onder 4f6ec1cd2a [IMP] website,*: support multiple websites
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.
2018-08-13 19:51:10 +02:00
qdp-odoo 01216345e2 [REF] account,payment(_*),sale*: downgrade transactions into debug items
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
2018-05-23 15:44:55 +02:00
Dhawal Limbuwala 930b682b1d [IMP] website_sale: Fetch confirmed orders grouped by product templates
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
2017-12-05 13:13:22 +01:00
Christophe Simonis 99bf9e4563 [MERGE] forward port branch saas-16 up to 89df681b45 2017-09-28 13:24:14 +02:00
Christophe Simonis da15615c45 [MERGE] forward port branch saas-14 up to aca401c500 2017-09-28 10:53:37 +02:00
Martin Trigaux 88edeeca6a [FIX] preventing context.get('lang')
The lang in the context can be None or False
To avoid similar error as revealed at ede29e6d, correctly retrieve the context
2017-09-26 16:58:59 +02:00
Christophe Monniez bfa85c84a6 [IMP] website_sale: manage abandoned cart
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).
2017-09-15 16:55:17 +02:00
Jeremy Kersten 653e30d8f8 [FIX] website_sale, website_crm : add missing import and remove useless
Fix: NameError: global name '_' is not defined

Related to odoo/odoo@4c66eae308
2017-06-27 22:29:13 +02:00
Martin Trigaux 4c66eae308 [FIX] website_sale,website_crm: untranslated term
opw-748880
2017-06-26 17:05:39 +02:00
Rohan Patel 477666d3da [IMP] website_sale: improve policy of what is an abandoned cart
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
2017-06-20 10:00:12 +02:00
Thibault Delavallée cb5ddc8ecf [FIX] website_sale: fix heuristic of abandoned carts
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.
2017-03-07 10:50:42 +01:00
Thibault Delavallée 68225b3a69 [IMP] website_sale: improve website dashboard computation
* 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
2017-03-06 15:38:07 +01:00
Rohan Patel f6fc7c2319 [REF] website_sale: improve sales part of website dashboard
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.
2017-03-03 16:57:06 +01:00
Rohan Patel b9d831c66e [MOV] website_sale: move and rename files according to guidelines and clean imports
There should be no functional change implied by this commit. Only some
code move and file renaming to match guidelines.
2017-03-03 16:57:06 +01:00
Damien Bouvy 0ed6621e03 [IMP] website_sale: make the website admin graph acl-aware
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.
2016-09-16 11:46:39 +02:00
Ravi Gadhia 788c1334e2 [IMP] website_sale: migration to new api 2016-03-17 17:26:52 +01:00
Martin Geubelle 42c82d57de [ADD] website, website_sale, website_crm: new dashboard 2016-03-10 13:41:10 +01:00