Commit Graph
156269 Commits
Author SHA1 Message Date
Tiffany Chang (tic) 4e32d1fe37 [FIX] purchase_requsition: ensure product_uom_id exists in bo lines
Previous commit 0501bbd62e made it so
the `product_uom_id` for the `line_ids` of a purchase.requsition (i.e. a
blanket order) were no longer being saved when the UoM setting is not
active. This would cause an error to occur when the "New Quotation"
button is pushed because the missing uom is expected by purchase
_onchange_requisition_id.

Steps to reproduce:
- Have UoM setting NOT active
- Create a blanket order for any product/vendor
- Confirm the blanket order
- Click on "New Quotation"

Expected Behavior:
New RFQ created

Actual Behavior:
Stacktrace

We also properly restrict the product_uom_id in the form view of the
line_ids to when the uom setting is active.

closes odoo/odoo#104900

X-original-commit: e90200a7b927ecccb8d4d6f31e3ddecba24d0b6d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-17 11:58:50 +01:00
Tiffany Chang (tic) 5b9c93ef04 [FIX] repair: handle uom without view exposure
Previous fix
https://github.com/odoo/odoo/commit/72dff43a4da277b002966f5fd4045b7f9a3855ad
re-exposed uoms in the view even if the setting is not active, but we
prefer to avoid this if possible. In order to do this we ensure that the
uom is set even if it is not visible in the view. Most of these are
already handled by compute methods, but except for `repair.fee` so we
only add in a guarantee for that model.

Note that the write case is included in cases when:
- the uoms were previously activated and set => deactivated again
- demo data has different uoms set and uoms setting is not active

X-original-commit: 7e64ebb3d8d3f3d3749304a325eb073777b129dc
Part-of: odoo/odoo#104900
2022-11-17 11:58:50 +01:00
Tiffany Chang (tic) a659c40ae3 [FIX] stock: allow editing of scrap_qty
scrap_qty was recently turned into a compute but was missing
readonly=False so scraps created from scratch were stuck on a scrap_qty
of 1.

X-original-commit: e2a2a6e2526446b6f8d041135a4e5653fa96bb47
Part-of: odoo/odoo#104900
2022-11-17 11:58:50 +01:00
Hubert Van de Walle (huvw) fdd60894ae [FIX] web: rtl assets in ltr language in debug mode
Steps to reproduce:

  - Switch to `?debug=assets`
  - Change the user language to Arabic and back to English
  -> The page is still displayed in rtl mode

Cause of the issue:

  The css is retrieved like this

  ```py
  >>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')])
  ir.attachment(212, 189)

  >>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')]).mapped('url')
  ['/web/assets/212-5d47380/rtl/web.assets_common.css', '/web/assets/189-5d47380/web.assets_common.css']
  ```
  Only the second one should be matched.

Solution:

  Check for the absence of an extra parameter in the url

opw-2892012

closes odoo/odoo#105127

X-original-commit: 539427fa2a099b29adf099c2b48d4f1d2fd4ebd2
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-11-17 10:57:10 +01:00
Manisha Tulsiyani 2e513973d7 [IMP] (sale_)project,timesheet: improve the UX for project app
Purpose of the commit is to do the generic improvements for project app.

So in this commit did the following changes:
 - add the 'creation date', 'last stage update', 'SOL', 'my deadline' fields in
   project task list view.
 - add the 'my deadline', 'next activity' fields in project list view.
 - crop the label of the stage after x characters in task portal form view.
 - remove the 'collaborators' stat button from project update right-side panel.
 - renamed sold->sales, services->sales order items, effective->delivered,
   remove the totals, include non-service SOLs, increase the size of the SOL
   column

task-2928100

closes odoo/odoo#97870

Related: odoo/enterprise#30268
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-17 10:57:07 +01:00
Rémi Rahir 09847abea0 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/1b4fac5a [FIX] edition: Handle too long formulas
https://github.com/odoo/o-spreadsheet/commit/544cfe68 [FIX] composer: Allow to paste text in the composer
https://github.com/odoo/o-spreadsheet/commit/f04c7589 [FIX] functions: dichotomicSearch handle 2d array
https://github.com/odoo/o-spreadsheet/commit/3660bf27 [REF] components: enforce component autonomy during keyboard event handling
https://github.com/odoo/o-spreadsheet/commit/39bb9d88 [IMP] keyboard shortcuts: Insert link
https://github.com/odoo/o-spreadsheet/commit/a40186aa [FIX] grid: capture IME altered inputs
https://github.com/odoo/o-spreadsheet/commit/a884c78a [FIX] sheet: prevent creation of sheet with the same id
https://github.com/odoo/o-spreadsheet/commit/aff05bdd [FIX] figure: prevent duplication of figure id
https://github.com/odoo/o-spreadsheet/commit/5c18b6e1 [REF] ranges: make Range immutable object
https://github.com/odoo/o-spreadsheet/commit/de5612e3 [FIX] config: Allow to build outside of git repository
https://github.com/odoo/o-spreadsheet/commit/b100135c [FIX] grid: remove old component
https://github.com/odoo/o-spreadsheet/commit/45f7f714 [FIX] selection: update default selection anchor on dispatched commands
https://github.com/odoo/o-spreadsheet/commit/b41a1610 [FIX] selection: don't reset selection on Autofill
https://github.com/odoo/o-spreadsheet/commit/16a98748 [FIX] selection: Properly add merge when adding them to the selection
https://github.com/odoo/o-spreadsheet/commit/231bbbca [FIX] model: do not replay core commands in ui plugins

closes odoo/odoo#105837

Related: odoo/enterprise#34029
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-11-17 08:58:45 +01:00
Nicolas (vin) 3d58e967ef [FIX] website_sale: fix products_snippet_recently_viewed tour
The tour is failing undeterministically, seemingly because a step is
done too soon after the previous one without giving the time for the
website to reload everything as expected.

By reordering the steps a bit, this issue can be avoided and fix the
test issue.

closes odoo/odoo#105891

X-original-commit: ff91efcda8cb80da4c376e74714f4c0dedad63c1
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-16 21:43:52 +01:00
Xavier Luyckx (xlu) 67802eb759 [FIX] web: products snippet: fix layout issues
Before this commit, some templates for the products snippet in website
had some layout issues. This commit fixes them.

task-3060991

closes odoo/odoo#105890

X-original-commit: e829b345f0f5e5346be416b8354c29fa9acb74a7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-16 21:43:49 +01:00
Rémi Rahir e5d34d93d3 [FIX] spreadsheet: Use actual scss variables
The style was using hardcoded css values for its button. unfortunately,
since it was not based on global varialbes, the colors are now outdated.

Task 3047620

closes odoo/odoo#105889

X-original-commit: 777a831cd7e3096de9421c224e192ef7c718c77f
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-11-16 21:43:46 +01:00
Mathias Mathy (MAMA) 15b22aac2a [FIX] mrp: prevent traceback on WO scheduling during MO planning
Use Case 1
Steps to reproduce :
    Create a MO without BOM, schedule a WO (OP1), save and confirm.
    Add a second WO (OP2) scheduled before OP1 and save

Expected behavior:
    Workorders are correctly planned and MO is ready to be processed
Actual Behavior
    TypeError due to the default `duration_expected` value of 0.0 being interpreted as False at
    https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L419
    which results in `date_planned_finished = False`.
    This causes a traceback at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L502
    due to trying to compare a date and a boolean.

-----------
Use Case 2
Steps to reproduce :
    Create a new MO without BoM and with 2 workorders
    Set a `date_planned_start` value for the 2nd workorder
    Confirm MO + Plan MO
    Set a 'date_planned_start' value for the 1st workorder
    Save MO

Expected behavior:
    Workorders are correctly planned and MO is ready to be processed

Actual behavior:
    TyperError due to 'leave_id.date_from' set to False at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_production.py#L1324
    It was caused by a bad condition at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L506
    leading to an exit of the method at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L510
    before creation of the aforementioned 'leave_id' at https://github.com/odoo/odoo/blob/3e49e533892f94eeb094a436fa34cbac3ed7ad6d/addons/mrp/models/mrp_workorder.py#L537-L547

closes odoo/odoo#105878

Task: 2985735
X-original-commit: 45ae7a459672bf130296b541a015db461845a051
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-16 16:24:53 +01:00
niyasraphy b345e1963b [FIX] stock: scrap order with 0 quantity
currently odoo is allowing to create a scrap order record with 0 quantty, which doesn't make sense and also if it is allowed, user wont be able to edit change the quantity later. currently zero quantity is not blocked by _check_positive_qty_done on stock.move.line. And it doesn't make sense to scrap 0, thus preventing the same by raising a validation

closes odoo/odoo#105752

X-original-commit: eb899fe8dda12d0f0e4ae515bb01e65981f4fbcd
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-16 16:24:48 +01:00
Raphael Collet 2e68b13160 [FIX] mail: incorrect flush in mail_message._search()
closes odoo/odoo#105869

X-original-commit: 7ecef516e364d922d7f92972e2269e6ed33c895a
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-11-16 15:21:06 +01:00
Adrien Widart (awt) a2f4a53148 [FIX] mrp_subcontracting_dropshipping,purchase_stock: return to supplier
When returning a dropshipped and subcontracted product to the supplier
location, the received quantity of the PO line will be incorrect

To reproduce the issue:
1. Create two storable products P_compo, P_Finished
2. Create a BoM:
    - Product: P_finished
    - Type: Subcontracting
    - Subcontractors: a subcontractor S
    - Components: 1 x P_compo
3. Create and confirm a PO:
    - Vendor: S
    - Deliver To: Dropship
    - Drop Ship Address: a partner P
    - Products: 1 x P_finished
4. Validate the receipt
5. Create a return with 1 x P_finished:
    - Update SO/PO quantities: True
    - Return Location: Partner Locations/Vendors
6. Validate the return
7. Go back to the PO

Error: The qty received is 2, it should be 0

There is currently no code to handle the return of a dropshipped product

OPW-3030895

closes odoo/odoo#105863

X-original-commit: 0a03678889d46dfc39922c0df965c06457f28d79
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-16 13:23:41 +01:00
Adrien Widart (awt) 5492421480 [FIX] mrp_subcontracting_dropshipping: return to stock location
When returning a dropshipped and subcontracted product to an internal
location, the received quantity of the PO line will be incorrect

To reproduce the issue:
1. In Settings, enable "Storage Locations"
2. Create two storable products P_compo, P_Finished
3. Create a BoM:
    - Product: P_finished
    - Type: Subcontracting
    - Subcontractors: a subcontractor S
    - Components: 1 x P_compo
4. In Locations, edit WH/Stock:
    - Return location: True
5. Create and confirm a PO:
    - Vendor: S
    - Deliver To: Dropship
    - Drop Ship Address: a partner P
    - Products: 1 x P_finished
6. Validate the receipt
7. Create a return with 1 x P_finished:
    - Update SO/PO quantities: True
    - Return Location: WH/Stock
8. Validate the return
9. Go back to the PO

Error: The qty received is 2, it should be 1 (it should not be 0 since
the product has been returned to an internal location)

In `/purchase_stock._compute_qty_received`, there is already a code to
anticipate such a situation (i.e., a user who returns a dropshipped
product to his stock location):
https://github.com/odoo/odoo/blob/bf3c398f0644f690c64815b2b6e298aed7bedd70/addons/purchase_stock/models/purchase.py#L300-L305
However, the methods `_is_dropshipped` and `_is_dropshipped_returned` do
not include the feature subcontracting + dropshipping. This is the
reason why, in `_compute_qty_received`, the above condition is not
respected and why we add the return stock move to the received qty.

OPW-3030895

X-original-commit: 5dffa88e788355efe7b9b9bccff75fdbd52713e9
Part-of: odoo/odoo#105863
2022-11-16 13:23:41 +01:00
Joseph Caburnay 8b9f0ac264 [FIX] sms: save the record before opening the sms wizard
**Issue:**

- Open crm.
- Open a lead.
- Input a number in the phone field.
- Click everywhere for the input to be recognized.
- Click the sms button that appears when hovering over the phone
  field.
- BUG1: The shown dialog doesn't have the inputted phone number.
- BUG2: When closing the dialog, any changes made in the form
  before clicking the sms button are lost.

**Solution:**

Make sure the changes are saved before calling the action that
shows the wizard.

After this fix:
- The phone number input in the form is now used in the
  wizard.
- When closing the wizard, the "unsaved" changes are kept.

closes odoo/odoo#105862

Task-id: 3056454
X-original-commit: a1bc67d811cab58e6ab336c636a1b1d83fc64446
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-16 13:23:37 +01:00
CarmenMiranda 766efc97a4 [REF] pos_restaurant: Split _get_order_lines method
Splitting the method `_get_order_lines` will allow making it
inheritable, this way more order line fields can be added and expand
them easily and avoid having to overwrite it.

closes odoo/odoo#105858

X-original-commit: 457624160f03c28e9b90d14fb4c56fe2f7fabeed
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-16 13:23:32 +01:00
Ahmad Khanalizadeh e36077f450 [FIX] point_of_sale: search all fields when loading from database
Before this commit: when `Limited Products Loading` is enabled in
PoS settings, and `Load all remaining products in the background` is
disabled, the search bar only uses `name` to look for products to fetch
from database. This causes problem when for example the user is using
barcodes to identify products.

To fix this, the search domain should be expanded to include all of the
fields which are normally used when searching for products.

opw-3055960

closes odoo/odoo#105829

X-original-commit: ac6a7c7c34c0e4d4b4d7c7dcfb2d939a70a5bf09
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-11-16 12:26:01 +01:00
Rodopho Cammarosano de Lima (rcdl) c794f45032 [FIX] website: wrap user-facing strings in _t()
closes odoo/odoo#105685

X-original-commit: 4a5fa664074f7c6f14d10e3c887032ece2f73e5c
Related: odoo/enterprise#33911
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-16 11:29:23 +01:00
Nshimiyimana Séna c904a974e3 [FIX] base_vat: keep leading zeros on San Marino tax id
### Steps to reproduce
* install the *VAT Number Validation `(base_vat)`* and Contacts module.
* Create a new contact from San Marino and set their Tax Id to SM05426
* Save the contact

You should see that the leading zeros have been removed on the Tax Id
(here, SM05426 became SM5426)

opw-3007722

closes odoo/odoo#105830

X-original-commit: 24207914e9dae4b5f7e100245d4efe964f639415
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-11-16 10:28:53 +01:00
niyasraphy d095bfba33 [FIX] base_install_request: prevent module operations on uninstall
closes odoo/odoo#105818

X-original-commit: 8089e536f271f95e2efcbfa1dfea0e85bdcec7dd
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-11-16 10:28:50 +01:00
aliya 2dfcfca8fd [FIX] account: fix account creation bugs
- When importing account move lines, accounts are created with `name_create`. If the `account_id` column only contains the code, like "12345", the `split_code_name`
would only return a value for the name and leave the code empty. This is because the first group in the regex expects a space in the end, so "12345 " would work correctly.
The code is a required field, hence the import fails.
Removing \s from the first group fixes the issue and the code is saved correctly.
- There should be a UserError raised in `name_create` instead of the ValueError. The message should be clearer as well.
- It should not be possible to quick create an account from product category views.

task-3056847

closes odoo/odoo#105815

X-original-commit: 24758778172595388c19fd0a83d93d35f2260261
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2022-11-16 10:28:48 +01:00
JVegaB 56fd66257c [IMP] point_of_sale: using Odoo helper methods instead of backbones
closes odoo/odoo#105809

X-original-commit: a43f0afb09ddd2991b1768cc117231debf410928
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-16 10:28:45 +01:00
niyasraphy bf5388fdd7 [FIX] base: inter company upgrade boolean alignment in settings
closes odoo/odoo#105802

X-original-commit: 2887807d459813ff824af11e66832aa4fb0486b4
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-11-16 10:28:43 +01:00
Arthur Detroux (ard) 28d1894049 [FIX] website: wait for widgets to start before activating snippets
After [1], when an option that requires the page to be reloaded is
changed, the editor will try its best to reselect the same snippet.

However, in some scenarios, the snippets' options could not be activated
leaving the menu on the snippet drag and drop menu.

Steps to reproduce (race condition so might not always occur):
- Activate the cookie bar in the website settings
- In edit mode change the header menu style
- The Snippets Drag and Drop menu is displayed
- Instead the Header Options should be displayed

The reason is that an event is not 'awaited'. Indeed, when starting the
editor, a 'widgets_start_request' is fired and not awaited.
It creates a race condition that is visible in this case but could have
caused other issue.

For the in-depth technical reason this happens:
- The wysiwyg is started, the popup is on screen, its options are loaded
 by default (since it's needed to populate the invisibleDOM panel)
- activateSnippet is triggered with the Snippet it should focus on after
 reloading
- widgets_start_request is triggered which destroys the popup and
triggers an 'onHide' event within the option
- The triggers a 'snippet_option_visibility_update' which triggers an
activateSnippet(false) which hides everything that was enabled prior to
this point.

This commit fixes the issue by re-ordering the events and making sure
that the 'widgets_start_request' is awaited

[1]: https://github.com/odoo/odoo/commit/a3e34512bf229d5d55f9e9d9eb0a9f7211a5a826

task-2687506

closes odoo/odoo#105816

X-original-commit: 5a2d0a2a88b9ecc2c330a948dfd9140b9edc3af3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2022-11-16 09:28:39 +01:00
hiroh-odoo e01e603cde [IMP] sale_(project,timesheet): improve generic UX
Purpose of this commit is to improve the generic UX of the  project and
timesheet app.

So, in this commit improve the following:

 - set allocated_hous 0 of task when task is created from SO and SOL product
   invoice policy in either based on manual or based on milestone
 - in project.update description improve the following points,
     - hide the 'activities' heading if there is no activity to display.
     - hide the 'profitability' sentence if there in no AAL in project's AA.
 - rename the 'service on timesheet' product into 'service on timesheets'.

task-2924215

closes odoo/odoo#96298

Related: odoo/enterprise#29632
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-16 08:30:50 +01:00
Mahamadasif Ansari a821237a81 [FIX] mass_mailing: include the correct file reference in the demo data
Currently in mass mailing, the logo is missing in template id "mass_mail_1" of
the demo data. This is because there is a wrong file reference in the template.

With a recent refactoring (see commit[1]), it renames the "s_default_image_logo"
with "s_default_image_header_logo" but not change the file reference in
the demo data.

This commit resolves the above issue by including the correct file reference
in the demo data template.

commit[1] -https://github.com/odoo/odoo/commit/a559fe4
task-3054248

closes odoo/odoo#105817

X-original-commit: 9711103632521d111d7ce4e179d298a95d32e759
Related: odoo/enterprise#33972
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-11-16 07:32:39 +01:00
Mahamadasif Ansari dfdec50617 [FIX] mass_mailing: fix missing logo in welcome message template
Currently in mass_mailing when the user selects the welcome message
template in the mailing body, the logo is missing.

This is because the name of the logo image does not match the format, so
it converts the extension of the source image from png to jpg.

With a recent refactoring (see commit[1]), it renames the "s_default_image_logo"
with "s_default_image_header_logo", so when loading the template, the format of
the file name does not match with "s_default_image_logo" so it converts the
extension of the source of the image in the template from png to jpg, and
as a result, the image is not found.

This commit resolves the above issue by adding the "header_logo" context,
which prevents it from converting "s_default_image_logo" png to jpg. 

commit[1] -https://github.com/odoo/odoo/commit/a559fe4
task-3054248

X-original-commit: b41e8685f9b0462154f859441eebfd3a660c616c
Part-of: odoo/odoo#105817
2022-11-16 07:32:39 +01:00
Walid HANNICHE (waha) 49454df4fd [FIX] website_event: display ticket description correctly
Steps to reproduce:
 - create an event with a single ticket that has a description

Bug:
 The default quantity on the website is set to 0 where it should be 1

Cause:
 On this commit[1] adding description to a single ticket was done by
 applying the multiple tickets layout but this also sets qty to 0

Fix:
 removed the condition and added the description to the single ticket

opw-3018139

[1]:https://github.com/odoo/odoo/commit/9c4c953d004acaf916df348b670182b48b85d165

closes odoo/odoo#105819

X-original-commit: e9ab599113125bd55fdfd2e3d95f71f52e001660
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-15 22:06:15 +01:00
Xavier BOL (xbo) 9971d1e98d [FIX] project: correctly delete the personal stage group in kanban view
Before this commit, when the user removes a personal stage in Project
app and this personal stage has some tasks, the kanban model will reload
the data instead of delete the group. However, since the
`default_group_by` is personal stages then the group deleted stays
visible in the UI even if it is deleted for the backend side.

This commit flags the group deleted to avoid readd the empty group
when the reload is done to correctly remove the group in the UI.

task-2968326

closes odoo/odoo#105801

X-original-commit: ad5a569b6ee50cc2c643975b52f23b9df385b753
Related: odoo/enterprise#33967
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-15 19:22:13 +01:00
Xavier BOL (xbo) 927d6b9ae7 [FIX] project: display 2 stat buttons per row in mobile in right side panel
Before this commit, in project right side panel (when the user goes to
project update of a project) when the screen width is below then 1600px
the number of stat buttons is reduced to 3 stat buttons instead of 4.
The problem is in mobile view, there is no enough space to display 3
stat buttons in a row.

This commit reduces the number of stat buttons to 2 instead of 3 when
the user is in a mobile view.

task-2968326

X-original-commit: 50d710993d0a37526f75430f87310b2a2d67d69d
Part-of: odoo/odoo#105801
2022-11-15 19:22:13 +01:00
Xavier BOL (xbo) a19a63ea65 [FIX] project: review style of right side panel to avoid auto-scroll
Before this commit, when the user accesses to project update
view of a project with a mobile, the view auto scroll to the kanban
renderer and so the user will not directly see the right side panel
displayed above the kanban renderer when the view is a mobile view.

This commit changes the position of the right side panel to add the
ProjectRightSidePanel before the KanbanRenderer (or ListRenderer)
component, to avoid using `flex-direction: column-reverse;` in mobile
view because there is a auto-scroll because of that css property. And
so, the `flex-direction` will be `row-reverse` by default and when the
view is a mobile one, the `flex-direction` will be `column`.

task-2968326

X-original-commit: 05e46f779b9eb625dcd17a00c1c2228650a8f8d8
Part-of: odoo/odoo#105801
2022-11-15 19:22:12 +01:00
Xavier BOL (xbo) 5454c20917 [FIX] project: keep overflow-x in auto for list view in project update
Before this commit, when the user resizes a column to increase its size,
the list view will be below the right side panel and it was impossible
for the user to horizontally scroll to see the part of the list view
below the project right side panel.

This commit removes the `overflow-x: hidden;` on the list to be able to
horizontally scroll the list view as it is the case for the all others
list views when the size of list view is bigger than the width of the
screen.

task-2968326

X-original-commit: 865c510d7c015db97e19c77609dac864b7065f92
Part-of: odoo/odoo#105801
2022-11-15 19:22:12 +01:00
Xavier BOL (xbo) 856d8b2d07 [FIX] project: fix alignment issue in stat buttons in project update
Before this commit, before the OWL conversion, the number of tasks (for
instance) in the stat button was aligned to the left, and after the OWL
conversion it is aligned to the center.

This commit fixes the alignment to keep the same alignment before the
OWL conversion.

task-2968326

X-original-commit: 151d95dcee27fc790a86faa2e13996c284cc05b5
Part-of: odoo/odoo#105801
2022-11-15 19:22:12 +01:00
Nikhilkrishnan be419f7231 [CLA] Nikhil Krishnan
closes odoo/odoo#105800

X-original-commit: 34dd3788b74d9618799e7b84a4ddc02718d3c169
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-15 19:22:05 +01:00
Aungkokolin1997 9c537516cc [CLA] Aungkokolin1997
closes odoo/odoo#105792

X-original-commit: 4ac5ec6a2c4b3e2707446acb1cd693808f0d3c8a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-15 19:22:00 +01:00
Aaron BohyandRomeo Fragomeli 73bf4d3b48 [FIX] web: Field: apply decorations on inputs/textareas
Fields in views can be decorated with attributes decoration-xxx
(e.g. decoration-danger="state == 'error'"). This typically
results in a bootstrap contextual classname being applied on the
field's root node (e.g. text-danger). However, these classes have
no effect on children inputs and textareas. Since we wrap wowl
fields into a div (which thus receives the contextual class),
decorations were no longer visible in edition (which is, by the
way, the mode of almost all fields in form views now).

To fix this issue, we manually force the color of inputs and
textareas inside fields, to the color of their parent.

closes odoo/odoo#105781

X-original-commit: 4b2624ab3e398fe036832d9348bc319992b4fcd1
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2022-11-15 19:21:57 +01:00
Aaron Bohy 2d7a32a223 [FIX] web: do not combine field domain with view domain
Have a many2one field with a domain set in the field definition in
python. Use this field in an editable list view, with a domain set
on the field node. For instance, go to Sales > Sales Team and see
Team Leader field.

Before this commit, we combined the field domain with the domain
set in the view, which isn't the spec. The spec is to use the
domain set in the view if there is one, and if there is not, use
the field domain (see _getDomain in basic_model.js).

In the scenario described above, it produced a crash because the
field domain couldn't be evaluated with the fields defined in the
view.

This commit restores the previous behavior.

closes odoo/odoo#105774

X-original-commit: 32654fd17ab366d20fff8b3fc8134ee209569f1d
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-15 18:25:53 +01:00
clesgow ba450b568f [FIX] mrp: Allow leaving the BOM Overview
Typo made the call to `this.changeFolded` instead of
`this.props.changeFolded`. As it couldn't be found in the unmount, it
raised an error each time the user tried to leave the report.

Steps to reproduce :
Go to MRP -> Products -> Bill of Materials -> Any BoM -> Overview -> Go
anywhere else than the report.

Also got rid of the now useless `this.bus` in the main overview
component.

opw-3061658

closes odoo/odoo#105773

X-original-commit: c22e7a2a245ce98654a4d99a663c555bedfee165
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-11-15 18:25:50 +01:00
gawa-odoo 6e7f6c7c1e [IMP] l10n_de_{skr03,skr04}: add right accounts to tax groups
There are specific accounts that should be used for tax groups for
each version of the CoA

t-3059059

closes odoo/odoo#105770

X-original-commit: 453cf0b6d659d01ba2370a08f8259a0a46f80634
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2022-11-15 18:25:45 +01:00
Julien Castiaux ec4826ef5b [FIX] core: session logout after 16.0 migration
Create a 15.0 database with website, access the home page via your
browser. Stop the server and migrate the database to 16.0. Restart the
server with a `--dbfilter` that rejects the database you created and
refresh your browser. 500 Internal server error, attribute error:
the `request` object as no `session`.

An error could occurs after a migration to 16.0 due to the presence of
the `geoip` key in the session. `request.session.geoip` has been made a
deprecated alias to `request.geoip` between 15.0 and 16.0, see 04e9726.

Because the session was created before 16.0, the session dict does
contain a `geoip` key. Upon logging the session out, the session dict
is cleared. The default implementation of `clear()`[^1] inside of
`collections.abc.MutableMapping` can be summarized for our usecase to:

    for key in self:
        value = self[key]
        del self[key]

There is an extra `__getitem__` call due to `value = self[key]`, in the
case of the `geoip` key, it would access the alias. It is not possible
to accessing that alias inside of the `_get_dbname_and_session` method
of request as the session has not been set on `self` (the request) yet.

Yet inside of that method, we do `session.logout()` which `clear()` the
session which (wrongly) access the alias because `geoip` exists in the
internal dict (`'geoip' in self.keys()  # True`).

The solution has been to implement the `clear()` function ourself
instead of using the mixin of `MutableMapping`.

[^1]: https://github.com/python/cpython/blob/b43496c01a554cf41ae654a0379efae18609ad39/Lib/_collections_abc.py#L925-L931

closes odoo/odoo#105763

X-original-commit: b66e1ffa8e348eedf2de735babbc398290a8bffb
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-11-15 18:25:40 +01:00
Benjamin Vray 48ae46cb22 [FIX] website: fix language switcher in off-canvas menu
Since this commit [1], the header language switcher has been moved out
of the header navbar. This created a bug, when the off-canvas option of
the navbar is activated, the language switcher is no longer accessible
on mobile.

As this commit is in stable version, the fix is only in Javascript. It
puts the language switcher back in the navbar when the off-canvas menu
is opened.

A specific case with the "hamburger full" header template, where there
is the same bug with the "call to action" button, is also fixed by this
commit.

This commit also fixes display issues in the off-canvas menu.

[1]: https://github.com/odoo/odoo/commit/2a000e33c5a44ddf0a777b43d8266cc413d8e4e2

opw-2964824

closes odoo/odoo#105504

X-original-commit: b89dbb2e18c4ccebcd72e87758b5d3363ed875b3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-15 18:25:24 +01:00
fdardenne 4edbe54456 [REM] web: qweb views
QWeb views allowed to render QWeb templates rendered by the server in
a view.

Today, QWeb views are only used in website to see the hierarchy of
their views. The use case of website has now more sense in a client
action rather than an extension of a QWeb view.

This commit removes this view because it is not used anymore and will
probably not find any useful use case in the future.

closes odoo/odoo#103477

Related: odoo/upgrade#4016
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-15 18:25:12 +01:00
fdardenne 439db9eaeb [REF] website: view_hierarchy: refactor to client action
Before this commit, `view_hierarchy` extended the QWeb view to see
the hierarchy of views.

With the evolution of the javascript framework, this use case has
now more sense in a client action rather than an extension of a
QWeb view.

This commit refactors `view_hierarchy` into a client action.

Part-of: odoo/odoo#103477
2022-11-15 18:25:12 +01:00
Audric Onockx (auon) c513b57c3e [IMP] hr_timesheet: populate
task-3030132

closes odoo/odoo#103426

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-15 18:25:08 +01:00
Chong Wang (cwg) dc15f81d08 [IMP] core: new comments for translations
before this commit:
If a translation is used for web client, the translation has comment
'openerp-web'.

after this commit:
If a translation is used for web client, the translation has comment
'odoo-javascript'
If a translation is used for python, the translation has comment
'odoo-python'

PO/POT files with old comments still works. The only overhead is: translation
only for web client will also be stored as code translation for python.

closes odoo/odoo#105764

X-original-commit: 13a5fa56ac7a102ad38f7ecc11874786bdb2fe85
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2022-11-15 16:16:54 +01:00
Chong Wang (cwg) 424774e081 [FIX] core: fix export web client translations
before the commit: web client code translations cannot be exported in the po.

If a web client only translation (not used for python translation and has
comment openerp-web) has its translation in the po file of /i18n, when it is
exported in a po file from Settings -> Translations -> Export Translation,
its corresponding translation is missing.

after this commit: web client code translations can be exported in the po.

X-original-commit: c2bf7665363b988d7c7e8bff43e71b7b1097ad84
Part-of: odoo/odoo#105764
2022-11-15 16:16:54 +01:00
Philippe Wauthy 347dd08342 [FIX] hr_contract: add group on contract_id field
Add the hr_contract.group_hr_contract_employee_manager group on the contract_id field in hr_employee
to avoid having an access error once a user with Manager security group in Payroll tries to open the
Payroll app.

task-3053032

closes odoo/odoo#105753

X-original-commit: fa1b4f14257ca04c85c7541fd94b19dff939626c
Related: odoo/enterprise#33942
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-15 16:16:48 +01:00
Nshimiyimana Séna 90b73796bc [FIX] web: fix copying markup object to clipboard
### Steps to reproduce
* install Live Chat (`im_livechat`)
* Go to Live Chat > click any channel
* Under Widget, Click the copy button for the first link

If you're on firefox, nothing will happen (text won't be copied).
On chrome, you will get a traceback saying `Failed to execute 'write' on
'Clipboard'`.

### Expected behavior
The text should be copied to the clipboard, and a tooltip should appear
to confirm that.

opw-3058357

closes odoo/odoo#105756

X-original-commit: 977f5aacf46c3746380dda33585b407df659e07d
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-11-15 13:01:40 +01:00
Nshimiyimana Séna f1eb3b9d42 [FIX] website_sale: register the website_sale.FieldVideoPreview template
### Steps to reproduce
* install `website_sale` (eCommerce)
* go to any product's form view
* in the 'Sales' tab, click `ADD A MEDIA`
* fill the 'Video URL' field and save

You should be met with a traceback saying that the template
`website_sale.FieldVideoPreview` is missing.

opw-3057118

closes odoo/odoo#105755

X-original-commit: 9cbb0ab0bafa4e05673862d601a7b089bbd2b519
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-15 13:01:38 +01:00
niyasraphy bdd47f07ef [FIX] mail: add a placeholder on language selection
Add a placeholder to beautify the UX of mail preview wizard. Field is currently
a bit hard to sport with the new UI.

closes odoo/odoo#105751

X-original-commit: fd5a5bc38bad09e3e8e99ff22e64a5dda60e32aa
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-15 13:01:35 +01:00