In the sale_report sql request for pos orders, the field qty of order
lines is used without specifying the table it comes from.
To avoid ambiguity if a field with same name is declared in another
table of the join, we prefix it by its table.
ISSUE-54933
closesodoo/odoo#54960
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
The pos.order.line quantity wasn't considered when computing the discount amount.
E.g. buying 5 products (1$) at 50% would only show 0.5$ as discount_amount, instead of 2.5$.
Followup of #43587closesodoo/odoo#51872
X-original-commit: 96e96284fceb2f68838c85f04c40da65176eb006
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Create a product with UoM Dozens
Sold 5x via POS
Go to the product page
The smart button does not reflect the correct quantity
(0.42 instead of 5).
Fixing by editing the SQL query, the POS already provide
the correct quantity of sold goods as it is not possible
to change the UoM. This aim to match the behavior of sale (where
is necessary to account for possible differences between the uom
reported on the sale order line and the one specified in the product
page)
opw-2227482
closesodoo/odoo#49313
X-original-commit: 7af831fe47005c6a7724d8d28bf3d045a75f0f09
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
* 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>
For now the sales team is only used on the pos.config and now on the invoices generated.
When you open the sale report, you'll see the sales team of the pos.order, but in reality it is the one of the related pos config.
That means that if you change the pos team on a config. It will change the pos team of all existing order.
We should store sales team on pos order, like on invoice and sale order
TASK-ID: 2011460
closesodoo/odoo#34246
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Performance issue
-----------------
In databases with a lot of POS order lines, the Sales Analysis report is
quite slow. This impacts performances in the report itself and in the
form views of products and product templates. Indeed, they use the
`sale.report` model to compute the `sales_count` field on products.
opw-1987368
Bug on UOM
----------
- Activate Units of Measure
- Create a product A, set its UOM to 'g' (grams)
- Sell one product in the POS
In the Sales Analysis report, the amount is multiplied by 1000.
opw-1978462
Bug on taxes
------------
See issue #24746
All issues originates from the SQL view which is quite complex for no
good reason. Indeed, in v12 the fields `price_subtotal` and
`price_subtotal_incl` are stored and contain the necessary amounts.
closesodoo/odoo#33304
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
When the sales count on the product form doesn't take into account the
sales done in point of sale.
So we've extend the list of done states to take the ones from point of
sale.
TASK-ID: 1985493
closesodoo/odoo#33422
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
- added the campaign parameters on event_registration.
- added the campaign parameters on sale_order and move the same parameters to the invoice generated for that so.
Task-1929272
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
- Set the compay currency in USD
- Set the rate of USD to 1.0, the rate of EUR to 2.0
- Create a EUR pricelist and associate it to the POS
- Sell a product in the POS at 200 EUR (= 100 USD)
- Go to Sales > Reporting > Sales
The POS order is evaluated at 200 EUR instead of 100 USD.
Since the sales report has been merged among the various sales channels,
we must keep the same logic when it comes to currency conversion.
opw-1890778
closesodoo/odoo#27786
Impacted modules: sale, sale_margin, sale_timesheet, pos_sale
This speed up a lot reports like sale.report when multiple currencies
with multiple rates are used, even with few currencies and few rates.
Using `_select_companies_rates` in SQL view bring lots of JOINs,
which slow down the view generation. This commit adds a computed
stored field containing the currency rate at the order date to speed
up report generation (database schema denormalisation).
This commit also use this new column on sale.report extensions and on
the project.profitability.report in sale_timesheet module.
Since a4d6bff197, the pos.report is
included in the sale.report. So, the same change had to be
applied on the pos.order model.
Task #1877418Closes#25089
In order to be able to add some enterprise views to sale, we need to
define some act_window.views.
We also make some slight changes in the sale_report for use in
sale_enterprise
This issue was introduced with the following commit
https://github.com/odoo/odoo/commit/a4d6bff197b894f70eaecf5aa4e2088e5b014780
The problem is that during the task #58961 we changed the API to
generate the sale_report, but forgot to include the
website_sale_dashboard sale_report, hence when accessing we had a
traceback since this file was using the old API.
Task #1869500Closes#26070
In Sales, we want to merge the `All Channels Sale Orders` report with
the `Sales` report in order to avoid having information scattered
accross two different reports.
Related to task #58961Closes#23324
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.