The changes concern the following modules:
- sale
- sale_product_configurator
- website_sale
- website_sale_product_configurator
When optional products are enabled and a user adds an item to the cart, the
modal popup does not allow further modifications to the main product based
on its template. If the user wants to change the color or the material, they
have to close the popup, modify the product and open it back up.
The same is applied when Add to Cart is active, and the user cannot configure
the product at all after clicking the add to cart button.
This change will make it possible to change the product variants without having
to close the modal, and configure the product when using the "Add to cart"
button when it's enabled.
The added configuration step is needed for some cases like the following:
1. When adding a product that had variants directly from the /shop page before,
the first variant was added by default and configuring it was impossible without
explicitly going on the product's page and configuring it from there. This
behaviour made no sense, and it's the reason the "optional products modal"
(which should no longer be called that) is opened when the product is not
configured even if there are no optional products.
2. When going through the product's page, and there are optional products enabled
for the product getting configured, then it's nice but not necessary to be able to
configure the product further while choosing and configuring the optional products.
This doesn't add an extra step in any case, it just makes it possible to still configure
your product in the modal.
3. If there are no optional products, the configuration made on the product's
page is taken into account and the product is directly added to the cart without
opening the modal, which is the same behaviour as previously.
Only one modal is shown, depending on the situation:
- For the website flow, if the product is not configured and has variants or has
optional products (or both), a popup shows that allows for configuration +
choosing and configuring optional products.
- For the sales flow, there was already a configuration popup, so the optional
products modal is only shown when there are optional products and replaces
the first instead.
Some tests were adapted to function with the new product configuration modal:
- The steps checking for the text mentioned above are removed
- Triggers were adapted to the modal for products that were previously added to cart
with their default variant
- Various other small adjustments
task-2541663
closesodoo/odoo#73086
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This revision has a similar goal than the previous revision
62c5b8d95c1ba5634e201c0c8a3e2d91fb2305a7
but this times, it's a kit/phantom bom which is nested in another
kit/phantom bom, and their computation is asked in the same time.
```
2021-08-20 11:29:54,835 1689 ERROR db_22687 odoo.upgrade.stock.tests.test_on_hand_quantity: FAIL: TestOnHandQuantityUnchanged.test_check
Traceback (most recent call last):
File "/tmp/tmpv3ujv2vr/migrations/testing.py", line 208, in test_check
self.check(value)
File "/tmp/tmpv3ujv2vr/migrations/stock/tests/test_on_hand_quantity.py", line 20, in check
self.assertEqual(before_results, self.convert_check(after_results), self.message)
AssertionError: Lists differ: [[551[14585 chars] [8988, '137'], [8989, '137'], [8990, '20'], [[1793 chars]91']] != [[551[14585 chars] [8989, '137'], [8990, '20'], [8991, '126'], [[1778 chars]91']]
First differing element 1007:
[8988, '137']
[8989, '137'
```
```
SELECT b.id, b.type, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as
kit_product_name FROM mrp_bom b JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product p ON p.pr
oduct_tmpl_id = pt.id WHERE p.id = 8988;
-[ RECORD 1 ]-------+-----------------
id | 2208
type | phantom
kit_product_id | 8988
kit_product_tmpl_id | 9049
kit_product_name | KIT Poulie AR G4
```
```
SELECT b.id, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as kit_product_name, l.product_id as component_product_id, component_t.name as component_name FROM mrp_bom_line l JOIN mrp_bom b ON l.bom_id = b.id JOIN product_product p ON p.product_tmpl_id = b.product_tmpl_id JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product component ON component.id = l.product_id JOIN product_template component_t ON component_t.id = component.product_tmpl_id WHERE l.product_id = 8988;
-[ RECORD 1 ]--------+---------------------
id | 2213
kit_product_id | 8761
kit_product_tmpl_id | 8879
kit_product_name | VEL BP KIT direction
component_product_id | 8988
component_name | KIT Poulie AR G4
```
upg-22687
closesodoo/odoo#75735
X-original-commit: c2df3d43fe16dde9057422f573fed1b976bc1c0b
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Small fix in discuss_sidebar_category_item. An item with type "group" should not have a ThreadIcon.
closesodoo/odoo#75731
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In master, in the 'Theme' tab of the website editor, the button to edit
color schemes has a light bulb icon, which doesn't clearly represent what
it does.
In this commit, we replace it with a palette SVG. Since we-select
elements do not have an image option implemented, we also add one
for future usage.
task-2618494
closesodoo/odoo#75730
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In master, users cannot see or edit eCommerce Categories on products
from the tree view in the Website app.
In this commit, we add eCommerce Categories to the tree view so that
users can edit them after a filter.
task-2618494
Part-of: odoo/odoo#75730
In master, the embed code snippet can only be dropped as a sibling.
In this commit, we allow dropping it as a child, by giving it the same
options as the countdown snippet.
task-2618494
Part-of: odoo/odoo#75730
When adding a media to the library using its external URL, the
confirmation icon (either error, warning, or success) will not be
spaced correctly, and will stick to the button on its right.
In this commit, we add a class to it which adds some padding on the
right.
task-2618494
Part-of: odoo/odoo#75730
The customers shouldn't see the 'Pricelist' word in the eCommerce shop.
In this commit, we thus remove it entirely.
task-2618494
Part-of: odoo/odoo#75730
"Dyn. Colors" implies that the colors are dynamic, such as in an
animation. This is not the case, as it just represents the main color,
or accent.
This commit renames the "Dyn. Colors" option to "Main Color" to better
match its functionality.
task-2618494
Part-of: odoo/odoo#75730
Issue: When receiving a mail on a alias for a job position, the
application is created correctly in the right stage but the e-mail
template for that stage is not sent to the applicant
Steps to reproduce :
1) Set an alias and a external mail server
2) Configure incoming mail server
3) Create a job position with a mail alias and a email template
4) Receive a mail for that job position
5) The application is created but no mail is sent to the applicant
Why is that a bug:
When we create an application manually the mail is sent to the
applicant but when creating it via e-mail reception, it's not sent
even though it should. This is due to stage_id missing from the flow
when receiving an e-mail
opw-2533310
closesodoo/odoo#75721
X-original-commit: 108b1c30e6254f24564246c401ad50a983498066
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
Purpose
=======
Fix missing translations on the Outlook / Gmail plugin and add them in
the mail plugin module.
Task-2612788
closesodoo/odoo#75599
X-original-commit: 47c9be8970011863e8e7b474665c823e751df085
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Assuming that the only thing cared about when removing items from stock
is the accessibility of the product. Then it would be better to take
products stored on the floor instead of on higher levels of my racks.
In this case current solutions in Odoo are not the most efficient.
Closest location picks items in the 'smallest' location (in alphabetical
order), so it assumes the locations are ordrered alphabetically
according to how close they are to the ground.
Assume we have the following stock :
- WH/Stock/Shelf 2
- WH/Stock
- WH/Stock/Shelf 1
Quants would be looked at in the following order :
1. WH/Stock (due to shortest name for the same stock)
2. WH/Stock/Shelf 1 (due to alphabetical order)
3. WH/Stock/Shelf 2
Task-2568735
closesodoo/odoo#75303
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit adds the smarts actions:
- Assign to... (many2one_avatar and many2many_avatar)
- Assign/unassign to me (many2one_avatar and many2many_avatar)
- Set priority... (priority)
- Set kanban state... (state_selection)
These smarts actions are commands with hotkeys accessible from
the form views containing the widget to which they are linked.
closesodoo/odoo#75312
Task-id: 2588238
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Remove superfluous dash in `project.task name_get` and replace it with
nbsp to be able to split on that specific value in a similar manner as
before.
Closesodoo/odoo#74350
Task ID: 2596229
Related: odoo/enterprise#19916
Related: odoo/upgrade#2705
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this PR when you accessed a certification through one company and passed it, the certification pdf was under the name of another company.
opw-2577532
closesodoo/odoo#75669
X-original-commit: 9f4fafee95e1f621a0d0b3a8bd5da6d059fa20c6
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
- Channels
* "hash tag" avatar with different backgroud colors
* only private channels have lock thread icon
- DM groups
* "users" avatar with different background colors
* no thread icon
task-2584994
closesodoo/odoo#75653
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Two tests in owl_dialog_tests were not correctly added in the parent
module of owl_dialog_tests.
These orphaned tests will therefore be associated with the previous
Qunit.module("name") and it will use its beforeEach.
If the module used does a makeTestEnv in its beforeEach, then the
"remove tabindex on inactive dialog" test will cause
"Error: Cannot add 'xxx' in this registry: it already exists" errors
because the test call createWebClient that does a second makeTestEnv.
closesodoo/odoo#75696
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Strap yourself in, we're in for a ride:
The module sale_stock_margin overrides
SaleOrderLine._compute_purchase_price and adds some extra dependencies,
the key dependency here is 'move_ids'.
The field move_ids is defined in sale_stock's override of
sale.order.line, however sale_stock is not a dependency of
sale_stock_margin, but since they implicitly share the same dependencies
and are both auto_install=True it is impossible to install
sale_stock_margin without having sale_stock be automatically installed.
However, since sale_stock_margin does not explicitly depend on
sale_stock, if one were to uninstall sale_stock without uninstalling
sale_stock_margin first, the registry would crash because
sale_stock_margin's override of _compute_purchase_price would depend
on a field that no longer exists (move_ids).
This commit changes sale_stock_margin's dependency graph to explicitly
depend on `sale_stock`, this in turn means we can forego the
`stock_account` dependency since it's an explicit dependency of
`sale_stock`.
closesodoo/odoo#75693
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When we want to open a quotation from the mobile view, we are
redirected to the POS Orders instead of the sale order.
This is because we are calling the wrong owl component.
Part-of: odoo/odoo#75682
Before this commit if the Apply/Discard buttons of the background image
positioning overlay were drawn outside of the visible area the user was
unable to access them - and thus had to reload the editor page.
After this commit the viewport is always scrolled to the background
image positioning overlay, making it always usable.
Because the block is always scrolled into the view, the buttons can
always be positioned near the top border of the overlay.
task-2627710
closesodoo/odoo#75679
X-original-commit: a9c3997b4bde08ceb75cacef7eb6ebad3efa7f44
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this fix applied color combinations were shown on the style
option.
After this fix the style option is displayed as any other plain option.
task-2612755
closesodoo/odoo#75665
X-original-commit: 2327248b8f67f5312f5630bf64fe49a31e025a09
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
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>
When there is a connection failure (eg. server restart) while we are
polling adyen for payment status during the payment process, we would
show a connection error and when clicking on retry, we would do a new
payment even if the first one was successful causing a double payment.
After dcb1e2b48, the retry after failure should just continue the
polling as if there was no connection failure, so for example:
- order 1: pay with adyen => connection failure during payment
- order 1: retry => payment successful
But in this particular case:
- order 1: pay with adyen => connection failure during payment
- order 1: close adyen payment line and pay with another payment method
- order 2: pay with adyen => we will receive the response from order 1
With this changeset, we only continue the polling for adyen status if we
are retrying to pay the same order.
opw-2587625
closesodoo/odoo#75640
X-original-commit: f83d1b13a96f8df559918b5905b949009d2ece88
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When the bills linked to a vehicle are displayed, the creation date is not always relevant. Sometimes, the Invoice/Bill Date is more interesting.
To avoid confusion, "Date" is renamed "Creation Date" and the column "Invoice/Bill Date" is added between "Creation Date" and the "Number" (bill number) columns.
Summary of the changes:
On the bills tree view for a specific car:
- "Date" is renamed in "Creation Date"
- "Invoice/Bill Date" is added between the "Creation Date" and the "Number" columns, the default is optional:show
task-2629316
closesodoo/odoo#75582
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit makes some major changes in the Point of Sale module
when posting journal entries which allowed the following new features:
1. Show that the invoice generated is paid unlike before where invoice
doesn't appear to be paid (both in the pdf and in the backend).
2. User can create a 'Pay Later' payment method (created by default as
'Customer Account') to allow the customers to make credit in their
purchases.
3. An extension possibility where POS can settle customers dues.
The above is accomplished by doing the following:
1. Invoices are now reconciled to created account moves by POS using
the pos payments registered to the pos order. And this is done
right after the order is synced to the backend.
2. A new type of pos payment called 'pay_later' is introduced.
- When an order is invoiced and is paid with 'pay_later' payment,
the customer in the invoice will have `due` in his account which is
immediately reflected when the order is synced.
- When an order is not invoiced and is paid with 'pay_later' payment,
the customer's 'due' reflects when the session is closed.
3. When the session is closed, POS payments from cash payment methods
are moved to the default account of the cash journal specified in the
payment method via creation of `account.bank.statement.line`s. (This is
already the case but it is mentioned this is for the purpose of
transparency.)
4. As for the bank pos payments, `account.payment` records are created
to move the payments to the specified `outstanding_account_id` in the
pos payment method. The `account.payment` records are written the bank
journal specified in the payment method.
5. As for the `pay_later` payments, we keep the behavior when no
journal is specified in the payment method where payments become
receivables to the customer who made the payments.
Other notable changes:
- The default POSS journal is changed to have 'general' type in order
to able to view the journal entries written in it.
- `pos.payment.method` can now be categorized as 'cash', 'bank' or 'pay_later'.
- `account_default_pos_receivable_account_id` can now be configured from
the Point of Sale general settings.
- `pos_invoice_report` is removed in favor of `account.account_invoices`
- disallow creating new payment method from `pos.config` form
- 'Journal Items' button in the `pos.session` form are now always visible.
- This allows seeing the list of invoices (and their payment moves)
to be accessible thru this button.
See test cases from the following spreadsheet:
https://docs.google.com/spreadsheets/d/1mt2jRSDU7OONPBFjwyTcnhRjITQI8rGMLLQA5K3fAjo/edit?usp=sharing
Part-of: odoo/odoo#74870
Purpose of the commit is to do the generic improvement for the
timesheets app.
So in this commit, done the following changes:
- added the "Timesheet Entries" report for the project.task object in project app.
- added the "Minimal duration and rounding applied when using the timer"
description for 'round timesheets' and rename 'round timesheets' to 'Time
Rounding' in the setting of the timesheets app.
- added the kanban view for the "reporting" menus in the timesheets app.
- change the 'x Timesheets' stat button into 'x Hours recorded' and icon to
'fa-clock-o' in invoice form view.
- rename 'round timesheets' to 'Time Rounding' in
setting.
closesodoo/odoo#71590
Taskid: 2459783
Related: odoo/enterprise#18668
Related: odoo/upgrade#2525
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In the backorder process the operation are done in this order:
1. If the MO has workorders then set the remaining quantity as quantity
producing
2. Confirm the moves
However the system do not expect qty done on draft moves for a lot
of operations.
This commit inverse the order to allow some buisness logique to work
(e.g the analytic accounting)
opw-2469742
closesodoo/odoo#68708
Related: odoo/enterprise#18594
Related: odoo/upgrade#2739
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Add analytic accounting for MO.
Post expense entries for:
1. raw material cost (change with consumed)
2. work center cost (change with real duration on work order)
Task-2469742
PR #68708
before this commit:
undefined data was keep coming in line graph, when timesheets were installed.
after this commit:
fixed the demo data from which this problem araises.
closesodoo/odoo#73313
Taskid: 2531430
Related: odoo/enterprise#19471
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
In this commit done following changes:
- add name_get to account_analytic_line model.
- changes in form view of timesheets menu
- hide company_id and amount field.
- move date field above unit_amount field.
- move employee_id field above name field in all timesheet menu.
- add so_line field in timesheets menu and move employee_id before
date in all timesheet menu when so_line is available.
- add so_line field in list view of timesheets menu as optional hide.
- add so_line field to kanban view after name field and change
o_kanban_record_top height 50 to 51 to show it properly.
- add a search for sale order item(so_line) and remove a search for
billable type(timesheet_invoice_type).
- remove filters Billable and Non Billable.
- add group_by for so_line and timesheet_invoice_id fields.
closesodoo/odoo#72979
Taskid: 2510313
Related: odoo/enterprise#19372
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Adds the employee tags as an optional field in the employee list view
as well as in the search view.
Closes: odoo/odoo#75480
Task ID: 2630604
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Add some "optional=show" in MO and WO, to have the possibility to hide some columns
Change the color of the state in MO list (we need to have the state draft in another color than grey)
--- Links ---
The PR: https://github.com/odoo/odoo/pull/75334
Task related: 2615395
closesodoo/odoo#75334
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Issue: When computing the landed cost for a transfer with quantity 0,
the validation of the LC wasn't working since there was a quantity 0
Steps to reproduce :
1) Create a PO for some items
2) Confirm, validate the delivery
3) Edit and unlock the delivery, set one quantity to 0, save
4) Create a landed cost for that transfer
5) Compute it
6) Validate -> Traceback
Why is that a bug:
There should not be a traceback, this is caused by trying to validate
a landed cost for a product where there is no quantity, if there is no
quantity, it should be part of the landed cost computation
opw-2599799
closesodoo/odoo#75565
X-original-commit: 800433bde03a36ead40a78bc6d53cbb95c24f97b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
Issue: In work centers with a capacity different than 1, the expected
duration was wrongly computed
Steps to reproduce :
1) Install Manufacture, enable Work Centers in Settings
2) Create a Work Center, Capacity = 2
3) Create a Product, with Manufacture as route
4) Create a Bill of Material :
Add any component
Add a operation line :
Work Center = created at 2)
Duration Computation = based on tracked time last 1 WO
5) Create a Manufacturing Order for the product 3), confirm
6) Set the real duration to 00:10, mark as done
7) Check the BoM Structure & Cost of the BoM 4)
-> Operations is 00:20
Why is that a bug:
To compute the expected duration, in mrp_workorder.py L691 we already
take into consideration the capacity of the work center.
When computing the time_cycle, we must give a time_cycle for 1 product
made with capacity 1, so we must first normalize the qty_produced fetch
from the DB to make like if we only produced the quantity once but in
the same amount of time
Side-Note: This also solves an issue with the Duration Computation based
on tracked time. The `limit` keyword was applied after the `group by`
so we effectively grouped all the operation_ids together, summing
their quantities and then limiting on the different operation_ids
opw-2562983
closesodoo/odoo#75557
X-original-commit: c78a25f92716bd6014de381c34f3bc268d1528ae
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
Some footer and header templates, introduced in [1] were using snippet
classes without the snippet data attribute. Therefore, they were not
using the snippets versioning system.
For example, the template_footer_descriptive was using an outdated
version of the s_title snippet, when a V001 css version had already been
introduced by [2].
[1]: 34ed29cbac80180982c9acc86c1412433bb88919
[2]: f34d7f4fab
task-2212216
closesodoo/odoo#75670
X-original-commit: bc4091e3049257a4517e556d51b2ed8e06e2095e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- The UI was updated twice (first to remove the overlay then to reselect
a surrounding snippet) -> that could be done in one operation.
- The UI update was not fully awaited.
- Add some inline comments to make the code more readable.
Note: this could be backported if the need ever arise.
Part of https://github.com/odoo/odoo/pull/74941
Part-of: odoo/odoo#74941
The editor was updated to handle a TODO but the TODO comment was not
removed. Originally, I wanted this commit to handle all TODO comments
around that code but failed to find the time -> at least this fixes the
comments...
Part of https://github.com/odoo/odoo/pull/74941
Part-of: odoo/odoo#74941