Before this commit, when we use the same widget than backend view, the
problem is the portal user cannot see the avatar picture of the
employees whom are not in the same company than him.
For this reason, this commit removes the avatar widget for this field.
task-2633229
closes#77156
X-original-commit: 3a21160d879d6244527b6b5640f796cfb84edfe2
Before this commit, the user can see the stat button but this button is
disabled. Since this button gives no more information.
This commit removes this stat button in the project sharing feature.
task-2633229
closes#77156
X-original-commit: 0e6995533f6733993a4d2554b2ed407f3a3ba3e1
Before this commit, since we don't have the uom in the session, the
timesheet_uom widgets does not work in project sharing feature.
Because those widgets need the uom stored in the session.
This commit adds the uoms needed in the session used for project
sharing feature.
task-2633229
closes#77156
X-original-commit: a8f27ac776e8f381cb467be3a0256b197d6e688f
Before this commit, we add the same search view than one in backend
views. But some filters are not needed since we display only one
project. For instance, the group by project is not useful since we have
only one project.
This commit removes the groups by project and create_date and add a
separator in filters.
task-2633229
closes#77156
X-original-commit: 1af17e529161bb745a183458b91972fa3a9b69f7
Before this commit, the portal user can see this button, but this button
should not be accessible by collaborators.
This commit removes the import button in project sharing feature to not
allow this to collaborators.
task-2633229
closes#77156
X-original-commit: 74d7308dfb8df0b923e68aa228ec406e36b0b89a
This commit reverts [1]. Otherwise, the same order lines may be
submitted several times.
To reproduce the issue:
(Use demo data)
1. Point of Sale > Configuration > Order Printers, edit Kitchen Printer:
- Printed Product Categories: Food
2. Edit the POS Bar:
- Enable Order Printer
3. Start a session of POS Bar
4. Select table T1
5. Add a Bacon Burger and submit the order
6. Open another table
7. Reopen table T1
8. Add a Cheese Burger and submit the order
Error: The ticket sent to the kitchen has the bacon burger and the
cheese burger. Only the last one should be sent to the kitchen
When selecting a table, a RPC call gets all information about the
current order. In the server response, the orderlines are sent as new
records:
https://github.com/odoo/odoo/blob/629a4f34ea66f10a981f4b25d5d69281f62853b6/addons/pos_restaurant/models/pos_order.py#L88
Therefore, the orderlines will have a new ID. However, since [1], the
lines identifiers are used to know which lines have changed. This
explains why the bacon burger is sent twice.
[1] 8159e5ac93b18d147fc8688f1dc48f75cbd44a9b
OPW-2678701
closesodoo/odoo#79436
X-original-commit: 75fb0aa6e9c314b61b30d49b5c463fa126dfc835
Signed-off-by: Masereel Pierre <pim@odoo.com>
Current Behaviour :
When mass producing with SN, the default number of SN to generate is set to 0.
Behaviour after the PR :
When mass producing with SN, the default number of SN to generate is the number of item to produce.
opw-2680306
closesodoo/odoo#79431
X-original-commit: 38e5d002acc2e516987acc0afe38648473fff708
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
With the sale_timesheet module installed, some Project Updates can contain an "Activities" section in the description, despite there being no activities to be shown, and some empty divs.
This commit will remove all of those unnecessary sections, which also spares us an expensive call to `project._get_profitability_common()`.
Task-2675389
closesodoo/odoo#79415
X-original-commit: 0741dde0598186d395a06ab6a9ea7056f0ff00ff
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Previously it did not matter that we didn't explictly include the
'res_model' in the action when auto-opening the reception report on
validation. With the barcode OWLification refactoring we now need to
include it otherwise it will never open when a barcode picking is
validated.
Part of Task: 2632884
Related ENT PR: odoo/enterprise#20805closesodoo/odoo#79408
X-original-commit: a966e9d122b6fa91906260e82eaea1ed720bd076
Related: odoo/enterprise#22122
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Simplify user workflow by not showing the "Allocation" button in the
(batch) picking form view if there is nothing to allocate (i.e. when
reception report is enabled).
Also:
- fix the location search condition for the outgoing moves that can
be allocated to (i.e. the same logic used in show_allocation field
compute logic is also used in reception report generation/auto-opening)
- replace ['stock.location'].search() with ._search() for better
performance.
Part of Task: 2632884
ENT PR (for barcode equivalent): odoo/enterprise#20805
X-original-commit: 11ffb85fe7398854e4aefa4f9d0cfbc3b88aad8a
Part-of: odoo/odoo#79408
When reception report is viewed in a mobile screen, the "Print Label(s)"
buttons do not fit well, therefore we use a print icon instead of text
when in a mobile view. To ensure it looks good, we also update the
buttons to have equal width/height where applicable.
Part of Task: 2632884
X-original-commit: fadc2dddf12521b0f81096b6225d67951584b714
Part-of: odoo/odoo#79408
Previously the reception report > "print labels" would only print the
picking name (or SO if provided) + delivery address (if provided) when
not for a MO. Label has been updated to include the product name.
During this update a few other related improvements were made:
- make the label based on stock.move (so extending is no longer
needed in MRP)
- formatting of label is improved so now address will be truncated
instead of wrapping (and potentially losing lines at end of address)
- line padding is reduced so we can fit more lines in the label
- "Print Labels" button at source level will now be enabled when its
corresponding "Assign All" button is pushed (previously only the
"Print Label"s of each moves' line was enabled.
Part of Task: 2632884
X-original-commit: 9774c1ab1d68cf095b64a82b56f100d747fc8a56
Part-of: odoo/odoo#79408
Make it so the (sales order) of a picking is also a clickable link in
the reception report. This was done in a flexible way so it should work
in theory for any stock.move._get_source_document() record, but it is
only applicable to sales orders for now.
Part of Task: 2632884
X-original-commit: d8cd091c3b61ac212fe9e92d532af7cefcf315a6
Part-of: odoo/odoo#79408
Adding the date of a SM on the picking form allows a user to reschedule
the delivery of a specific product instead of rescheduling the delivery
of all products.
Linked to OPW-2651828
closesodoo/odoo#79413
X-original-commit: 845f5bdde594f37d42ad12adcbe9489b1b64bd83
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
In last added migration script in odoo@b40216a, the code assumes the chart of account of l10n_es is installed. But happens that you may have installed several l10n_* modules, including l10n_es, but not having the chart of l10n_es installed (you have installed the chart of another module).
In this case, then the update crashes because tax_ids is None and tuple(tax_ids) crashes!
closesodoo/odoo#79323
X-original-commit: b7d21a93c9712d96340c5d57eaeb91bae80028b5
Signed-off-by: Olivier Colson <oco@odoo.com>
**Description of the issue/feature this PR addresses:**
There is no message shown to guest user on portal when he tries to reject a quotation.
**Current behavior before PR:**
When a guest user tried to reject am order in quotation state the popup just closed and did not give him any feedback or message that why the order is not getting cancelled.
**Desired behavior after PR is merged:**
In the /decline controller there is already a check via has_to_be_signed() method. If the check fails `message=cant_reject` is added to query_string.
On the XML side there is another check made towards has_to_be_signed method which will not render the message.
This commit removes the duplicate check from XML side and the message is now shown correctly to the portal user.
Fixes#79205
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#79409
Forward-port-of: odoo/odoo#79207
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
`assert_log_admin_access` uses the `name` field of `ir.module.module` for logging.
`assert_log_admin_access` was added to `install_demo` method of `ir.demo` in d345fb649e3e3c1bf141dca49b45503b8b3a7164 but `ir.demo` does not have `name` field, hence causing AttributeError.
The proposed solution here is to use `display_name` instead
closesodoo/odoo#79398
X-original-commit: 9d6f54e7f7219cbbda41129e35682f6a76aae1d4
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Raman Obaid Ahmed (raob) <raob@odoo.com>
This commit will modify some of the tasks from the demo data to place them in different personal stages for the demo users, to better showcase the feature.
Previously, none of the demo tasks belonged to a personal stage of any user.
Task-2657697
Closes#77870
Related: odoo/enterprise#21463
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit will indicate 'fa-lock private' for the 'Project' field for private tasks in the following views: list, calendar popover, kanban, activity.
Previously, this field was left blank.
Task-2657697
Closes#77870
If the multiple quantity of a RR is less than 1.0, the buttons 'Order
Once' and 'Automate Orders' may remain invisible
(Need sale_management,purchase_stock)
1. Create a product P
- Type: Storable
- Add a vendor
- Routes: Buy
- Reordering rule:
- Trigger: Manual
- Min Quantity: 0
- Max Quantity: 0
- Multiple Quantity: 0.01
2. Create and confirm a sale order with 0.50 x P
3. Inventory > Operations > Replenishment
Error: P is present, its qty to order is 0.50, however the button 'Order
Once' is not displayed
OPW-2612472
closesodoo/odoo#79379
X-original-commit: 81b2677677645329999cc496dc961db22bd522dd
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Purpose
=======
Improve frontend onboarding: add placeholders, improve tour, improve experience
when buying course (display what has been bought, avoid displaying buy now on
an already purchased course).
Specifications
==============
The tour of the front-end has been updated. It adds a step to enter fullscreen
mode and allow users to test it.
It updates the placeholders for the quiz creation, adding examples and hints
to ease user filling fields.
The course purchasing flow has been improved. It adds a direct link to the
purchased course(s) when the payment is done with the `sale_purchased_course`
template.
It also blocks the possibility to rebuy a course if the user is already a
member of said course by showing the buying options only if `channel.is_member`
is False. INdeed it makes no sense to display the "Buy" button when having
already bought the course.
This commit also removes the autocompletion of fields in modals.
Task-2623471
closesodoo/odoo#77050
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In a multi-warehouses environment, editing the quantities of the cart
products can lead to incorrect behaviors.
To reproduce the issue:
(Let WH01 be the default company's warehouse)
1. Create a second warehouse WH02
2. In Settings > Website > Products:
- Inventory > Warehouse: WH01
3. Create a product P:
- Type: Storable
- Availability: Show inventory on website and prevent sales if not
enough stock
- Available on eShop
4. Update P's quantity:
- Location: WH01/Stock, Qty: 10
5. Create a sale order SO:
- Lines:
- 100 x P
- Warehouse: WH02
6. Confirm SO
7. Go on eShop
8. Add P to the cart
9. On cart page, increase the quantity of P
Error: The quantity becomes -90 (then the product is automatically
removed from the cart)
The quantity maximum that the user can select is defined thanks to:
https://github.com/odoo/odoo/blob/8d2fd05382705d4b3987ebac4c842d8507ede9cf/addons/website_sale_stock/views/website_sale_stock_templates.xml#L12
When computing all the quantities (in `_compute_quantities_dict`), if
there isn't any warehouse in the context, the quantities will be
calculated on the basis of all warehouses:
https://github.com/odoo/odoo/blob/48698838dd47442145395d3d4396b64b6901dba1/addons/stock/models/product.py#L238-L248
As a result, in the above case, `virtual_available` will be equal to
`10 - 100 = -90`. However, a SO is linked to a specific warehouse, so
the computations should be based on this warehouse. That way,
`virtual_available` will be 10 and, when editing the quantities in the
cart, the maximum value will be correctly computed.
OPW-2667470
closesodoo/odoo#79370
X-original-commit: 2beb6b1b35ef4c02b6ca1494d1b10fb2cd3b752d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Prior to this fix:
The project update stat button is duplicated.
After this fix:
The project update stat button is no more duplicated.
task-2684233
closesodoo/odoo#79347
Signed-off-by: Xavier <xbo@odoo.com>
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