The component status of a MO is not correctly computed
To reproduce the issue:
(Use demo data)
1. Create and confirm a MO for 1 x [FURN_9666] Table
2. Unlock and edit the target of To Consume Qty:
- For [FURN_8522] Table Top: 0.1
- For [FURN_2333] Table Leg: 0.1
Error: The Component Status of the MO becomes "Available" while Table
Top and Table Leg are not available.
Due to the signature of `float_compare`:
https://github.com/odoo/odoo/blob/56f8c1c0487bf95325ca859e2f266d1beed28ad4/odoo/tools/float_utils.py#L127
`move.product_id.uom_id.rounding` is implicitly given to
`precision_digits`, which is incorrect.
OPW-2669931
closesodoo/odoo#79362
X-original-commit: c7077dedd63ad317517ad383855821e6570b963d
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Currently, when user open the question from helpdesk ticket and
user clicks on the back button of the forum page,
it redirects the user to the app switcher. It happens because the
back button contains the homepage URL as httprequest.referrer
does not support the fragment url with hash(#).
so this commit fixes the issue by binding the onclick event on the
back button so clicking on the back button redirects the user
to the helpdesk ticket.
task-2602604
closesodoo/odoo#77458
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
In 1e93c161ca454313436b65427542db961f6ddcdd we trigger RR when
confirming a MO. Same thing should be done if we changed the product qty
for a confirmed MO.
Task-2653116
closesodoo/odoo#79332
X-original-commit: 22eb5c38ff45f4e5cd5d2025d31960efa051ad6b
Signed-off-by: Arnold Moyaux <arm@odoo.com>
This reverts commit 3b3a47f0d3414ae5bee159f6ec4644e64441040f.
task-2667207
closesodoo/odoo#79333
X-original-commit: 09cb77ebf6915e6a98bc3d36869b71f5b495d878
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Steve Van Essche <svs@odoo.com>
- When locations are activated, fix not being able to add a quant for tracked products just after
creating one from the 'update quantity' window due to Inventory Adjustment location being auto-selected [since it is the last quant]
- Fix quant not properly making fields invisible after confirming from the stock track
confirmation window
closesodoo/odoo#79338
Pr: https://github.com/odoo/odoo/pull/78768
Task-id: 2674732
X-original-commit: ff26704e7afaa537530c0e092a88b73ee791775f
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: npi-odoo <npi@odoo.com>
The warning shown on beforeunload when quiting a page during edition
was missing since the new editor merge.
task-2666177
closesodoo/odoo#79325
X-original-commit: 6a7fa263e72de45d2e92c436321c01c4b70870a8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps to follow
- Edit a report with studio
- Add an inline text element
- Select it
- Select the text in the sidebar
-> An error is raised
Cause of the issue
firstButtonEl is undefined because the style section is not always
present in the toolbar
opw-2674302
closesodoo/odoo#79335
X-original-commit: 45b590d8961d56f8d207c22efbf1ba7188a3b1fa
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Previous task: odoo/odoo#61287 improved warnings for when using a
duplicate SN, including an auto-update of the source location when
appropriate. Unfortunately the auto-update is too risky when registering
a subcontracting SN tracked components.
Instead, we no longer update the source location when in a
subcontracting situation and update the warning message to match the
expected flow to fix the issue.
closesodoo/odoo#79334
Task: 2669180
X-original-commit: a430c4d7d6e2a02ef9b3905b554a779fc1643bcf
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Current behavior:
If you have 2 time the same product in the agreement and you confirm an order with just one line of this item
the 2 lines in the agreement will have the quantity.
Expected behavior:
Only the ordered item should have the quantity applied. In this case the products are compared with the price and
product ID. If you modify the price in the PO the first line of the agreement will have the quantity by default.
Steps to reproduce:
1. Create a new Purchase Agreement
-Add two lines with the same product
- First line has a scheduled date and price that are different from the second line
2. Generate RFQ and confirm PO with only the first product line and a set quantity
3. Once the PO has been confirmed, going back to the Purchase Agreement, the ordered quantities on both lines will be the same, although the PO was generated for only the first line.
opw-2627898
closesodoo/odoo#79322
X-original-commit: c09a16fb2483e8cec4c9c9e6a936ae2bcc490646
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Reproduce :
1. Add a default analytical rule: if Coin Gourmand partner then Administrative analytical account
2. Create a PO at the Coin Gourmand supplier, add a product, and select the Internal analytical account.
3. Bill for this product.
Result :
Internal analytical account has disappeared from the invoice line. It has been replaced by Administrative.
Issue :
AccountMove.create() computes an account in the move and this causes the analytic account to be reset at its default value from the rule.
Fix :
Since the account pocalypse in 13.0, account.move is making magic things during the creation of the invoice to create dynamically the invoice lines like account.invoice did before this huge refactoring.
The create is making a 'New' record to simulate the onchange but this code is a hack triggering unexpected recomputation like the analytic account.
To avoid that, we ensure to assign the minimum number of fields to preserve fields like the analytic account.
closesodoo/odoo#79321
X-original-commit: 876e2d1073312fe65cb6b2e3038235aeaa082c8a
Related: odoo/enterprise#22074
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
In the website builder, the toolbar was appearing in the theme tab
incorrectly.
task-2664956
closesodoo/odoo#79311
X-original-commit: a2198490befddb8c4cc6f3a543f47bbffe243f64
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the Replenishment orderpoints `qty_to_order` are
computed according to a precise forecast which take the time in count.
For example, if you plan a consumption for a product with a purchase
lead time of 2 days for the 2021-12-12 at 12:30, if the current date is
2021-12-10, the orderpoint for this product will have a quantity to
order once the hour is meet too but not before. With this commit, it
will take the forecast for the day regardless the time.
task-2652920
closesodoo/odoo#78712
Signed-off-by: Tiffany Chang <tic@odoo.com>
Steps to follow
- Go to email templates
- Select some text
- Click on the code button
- Resize the editor
-> Nothing happens
Cause of the issue
The default view of the editor is resized but not the code view
Solution
Change the code view height with the default view
opw-2669259
closesodoo/odoo#79315
X-original-commit: 3adc1ddb04dfc0dcd3b10e56e9ecaef7b04a18d4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
This commit fixes a bug when you clicked on a link related to an anchor.
e.g. an <a> tag with an href="#anchor". The scroll to the element
with id="anchor" didn't happen because the position was not found correctly.
The fix uses getBoundingCLientRect to get more precise positions
of the element with the anchor and the scrollable area.
A test is introduced to check scrolling for multiple anchors in a template
with a more complex structure (Note: the test fails without the fix).
The scroll behaves differently depending if the target is an anchor or
an element. An other test has been added for the command palette about this
behavior.
closesodoo/odoo#79310
X-original-commit: b0da44d62f85d6530f8e568025f7fea25c5454c5
Signed-off-by: FrancoisGe <fge@odoo.com>
Currently, hovering on the tooltip displays some content out of
the viewport. It happens because tooltip content div requires
270px width to display the text and the distance between the
tour indicator and viewport is less than 270px
so this commit fixes the issue by changing the position of the tooltip
indicator from left to the top so that the tooltip indicator displays
top of the element and hovering on it displays the full content
TaskID-2667140
closesodoo/odoo#79129
X-original-commit: 219d4aa27fbae944af6e18216b7bb96277b3d06d
Related: odoo/enterprise#21946
Signed-off-by: Laurent Smet <las@openerp.com>
Suppose an automated AVCO product category. When confirming an invoice,
if the associated product was a kit and if its BoM has changed during
the process, a traceback can occur.
To reproduce the issue:
(Need sale_management)
1. Create a product category PC:
- Costing Method: AVCO
- Inventory Valuation: Automated
2. Create 3 products P1, P2, P3:
- Product Type: Storable
- Category: PC
3. Update P3's quantity > 0
4. Create two bills of materials:
- BOM01:
- Product: P1
- BoM Type: Kit
- Components: 1 x P2
- BOM02:
- Product: P2
- BoM Type: Kit
- Components: 1 x P3
5. Create a sale order SO with 1 x P1
6. Confirm SO and process the delivery
7. Edit BOM02:
- BoM Type: Manufacture
8. On SO, create the invoice INV
9. Confirm INV
Error: an Odoo Server Error is displayed with a traceback: "[...] in
_compute_average_price, bom_line_data = bom_lines[bom_line] [...]
KeyError: mrp.bom.line(19,)"
On step 7, when changing the BoM type, a new BoM line is created.
Therefore, in `_compute_average_price`, the BoM associated to the move
(i.e., `bom_line`) is not one of the lines in `bom_lines` (i.e., the new
BoM lines). There is already a check in case the line has been deleted,
but not if it has been changed.
OPW-2610685
closesodoo/odoo#78917closesodoo/odoo#79293
X-original-commit: 3ae0b781bcb5c2840f848bc63b9f3f9e1b2812cb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Before this commit, we search grid and form views defined in
`timesheet_grid` module but this module is not available in
`sale_timesheet`.
This commit removes the grid view and use the form view defined in
`hr_timesheet` module instead of `timesheet_grid`.
Steps to reproduce:
==================
1) Go to the project app
2) Select Project updates for a project with `allow_timesheets=True`
3) Click on "Billable Time" button.
Expected behavior:
=================
Open by default the list view of timesheets related to the project.
Actual behavior:
===============
Traceback when the user clicks on this button because it does not found
the grid and form view in `timesheet_grid` module.
task-2665899
closes#78120closes#79034closesodoo/odoo#79291
X-original-commit: 9fd8fbe1c778fc05ac9e1441356ac5d0673b9ffc
Related: odoo/enterprise#22056
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, we search the leaves in the same interval of the
public leaves.
This commit searches all leaves containing the public leave in their
interval to get all leaves and not create a timesheet for this public
leave for an employee is already off.
task-2665899
closes#79034
X-original-commit: ca6c164075d83e6bace2451888f8a2365b769e1a
Part-of: odoo/odoo#79291
Before this commit, since the adding of new field in `product.template`
model called `detailed_type` to define the detailed type of a product.
We need to update some domains to select a correct timesheet product.
That is, the timesheet product must be a service product and not an
event or event booth product.
This commit updates the domains in those fields:
- `timesheet_product_id` field defined in project (`project.project`).
- `sale_line_id` field defined in the `project.create.sale.order` model.
to be sure we select a service product (or SOL with service product
linked) for timesheets.
task-2642872
closes#79034
X-original-commit: b60bc724c197f101d71109d7b8fcdfe7cdc5b57a
Part-of: odoo/odoo#79291
Before this commit, when the user creates a timesheet in task form view,
the `_onchange_so_line` is triggered after the compute method of
`so_line`. This behavior is not expected because it break the employee
rate feature to correctly determine the SOL of a timesheet.
This commit deprecates the onchange method to avoid change the
`is_so_line_manually_edited` when the user has not manually selected an
SOL for the timesheet. Instead of changing the
`is_so_line_manually_edited` field in the onchange method, a new widget
is created to override the `_onFieldChanged` defined many2one widget.
This widget will be linked to the `so_line` field in the list and form
view of timesheet. So, when the user manually changes the `so_line`
field, the `_onFieldChanged` method changes the
`is_so_line_manually_changed` to notify that is the user is manually
changed the `so_line` field on a timesheet.
task-2665899
closes#79034
X-original-commit: 9b1bfe597167d1a849ef3df850300ae8ec673fd3
Part-of: odoo/odoo#79291
Before this commit, when the value is null in the pivot view on a float
field, we format the value before displaying it. The problem is the
formatFloat method does not check if the value is null and used the
`toFixed` method to fixed the number of digits to display for the value.
This commit uses the value if it is not value otherwise use 0 to fixed
the number of digits. That is, when the value is null, the formatter
will return "0.00" (if the number of digits expected is 2) instead of
raise an error.
Steps to reproduce:
==================
1) Go to the helpdesk App > Reporting > Tickets Analysis.
2) Go to pivot view of this report.
3) Add the measure called "Rating (/5)"
Expected behaviour:
==================
Show the pivot with empty cells or 0.00 if the average of this measure
has no values.
Actual behaviour:
================
Traceback shown because it cannot read 'toFixed' property of null.
task-2665899
closes#79034
X-original-commit: d142705d9262dfa5fb489611ae0b5a2a04ff6fab
Part-of: odoo/odoo#79291
Prior to this commit, when a subtask is copied through the recurrence,
it loses its display_project_id in the copied sub-tasks.
Current Behavior
The display project id is left empty.
Expected Behavior
The display project id is copied.
task-2672243
closesodoo/odoo#79290
X-original-commit: 758b1a2f233bccd7fe7ac73119c12c4152d68e21
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose of this commit to do not copy progress of the project
update when coping project.
So, In this commit make last_update_id field copy false
so default progress of the project update will be 0%.
task-2664773
closesodoo/odoo#79283
X-original-commit: 69dab41858ea737929591123e85f2f982f58589c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this fix, if the country is not set on the company
the loading of the session may stall at some point.
A check is added and will prevent to start a session if the country
is not set.
opw-2557989
closesodoo/odoo#79276
X-original-commit: 8c325324c0f476d77fec79cba0570b025114fc88
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Steps to follow
Edit the account.move view (with studio for example)
Set the lines readonly property to [["partner_id","=",False]]
Create a new move
Add a partner
Add a product
Remove the partner
-> A traceback appears: widget.$el is undefined
Cause of the issue
widget.$el is used after the widget has been destroyed
The fix was already present in 14.0 (3fd7b2009e)
but we still need to keep the test
opw-2557142
closesodoo/odoo#79261
X-original-commit: 71e6d7e510ff9d44fe8deb16f29d50b021709074
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Steps to reproduce :
- Install E-commerce module
- Go to Website -> Products -> Products
- Edit product `Acoustic Bloc Screens`
- Type "my product" in Internal Notes an save
- Go to the Shop
- In the search bar, type "my product"
Issue :
`Acoustic Bloc Screens` is in the search results list
Cause :
An 'ilike' for 'description' is added to the domain.
Solution :
Replace 'description' by 'website_description' field in the domain.
opw-2649754
closesodoo/odoo#79004
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
This commit adds "unique" array utility function which
returns a copy of the given array but without any duplicates.
closesodoo/odoo#76472
Related: odoo/enterprise#20833
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, useAutofocus hook used the effect dependency
to check if the target is in dom but this dependency is computed
in onWillPatch and can be outdated when checking it in onPatched.
Now, the target isn't a dependency anymore and is computed just
before the check.
Part-of: odoo/odoo#76472
- Open session with cash control
- Set 300 €
- Close session
- Add Cash 50€
- Close session
- Set end Cash at 350 €
--> It raise an error
closesodoo/odoo#79240
X-original-commit: 3be9a02b8824356d97d442b64f2cbd66085254ea
Signed-off-by: Masereel Pierre <pim@odoo.com>
This allows to avoid tens of thousands of instructions being done at
each click in the editor.
At multiple places, the editor is asked to close all its widgets (for
example, when clicking on another snippet to edit). The original cost
of that action was to remove a class on each widget, which is a very
primitive action. But in the end we had to do more to close a widget: we
trigger_up an event and ask to close all sub widgets. When we ask the
editor to close all widgets... it makes sense not letting every sub
button of every select trigger_up an event.
closesodoo/odoo#79220
X-original-commit: 7aaf0e17f9c3d4e78b975dbd3747513d186ccc1e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
WO are released in confirmed state, but the help message says that they are released in draft.
opw-2609040
closesodoo/odoo#78954
X-original-commit: 3244944d0b6ccf7d18d8bb852183d14282674097
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Purpose of this commit to improve ux for timesheet app.
So, In this commit done following changes:
- make name field of account.analytic.line model translatable
by user.
- changes in report of timesheet:
- make generic table templete for timesheet.
- changes label for employee_id field column 'responsible'
into 'employee' and unit_amount field column
'time spent (hours)' into 'hours spent' and
'time spent (days)' into 'days spent'.
- move name(description) field column right of the task
column.
- add timesheet entry report for project.
- change internal project name when user has access to
multiple companies.
TaskId-2604773
closesodoo/odoo#75141
Related: odoo/enterprise#20242
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
If there was parameters in the from clause, there was a possible error
when reading progress bar for activities.
eg. grouping product.product by "Routes" raise an error because we have
in FORM clause like:
FROM … ON … AND "product_template__route_ids"."route_id" IN
(SELECT … WHERE … OR ("stock_location_route"."company_id" in %s))
so when we add timezone to parameters, it should be after FROM clause
parameters and before WHERE clause parameters.
opw-2674179
closesodoo/odoo#78867
X-original-commit: 904d0aab204b0ce40d7bc284086c33cbde6f06d8
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Only admin users should be able to load demo data, if needed.
This is only possible from the settings dashboard, and thus,
the method could be decorated.
See: c002e2eb37
This commit adds touch events helper for tests and new util used
to constrain a number between two values. The purpose of
the commit is to introduce the ActionSwiper component using those
functionnalities.
closesodoo/odoo#78426
Related: odoo/enterprise#21712
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>