Commit Graph
146299 Commits
Author SHA1 Message Date
Romain EstievenartandAdrien Dieudonné b614509698 [FIX] pos: "Discard" button at the wrong place.
"Discard" button shoud be on the left to respect the intuitive
mobile navigation.

We also take advantage of this commit to show icons and text on
desktop and only show the icons on mobile.

Task ID: 2453679

X-original-commit: f774f07a46197f7e1664aee32723b10bf6df37b4
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 8174f77eb0 [FIX] pos_*: Only show 3 control-buttons in product screen on mobile
Before this commit, when you clicked on "Review" the order lines weren't
visible due to the number of control-buttons.

To fix this, a "More..." button is displayed if there is more than 3 buttons.
When you click on this button, a new modal will display a menu with all controls.
Note that we had to find a way to close this popup after clicking on an action.

Task ID: 2453679

X-original-commit: 430d40f90c1e9a7e8e3663e8f2b129b0c24911e1
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 79882dc4b2 [FIX] pos: Receipt-Screen: elements misaligned on mobile
- Users were automatically redirected to the middle of the
  receipt screen on mobile. It direcly showed the ticket but
  users missed the buttons at the top of the page.
  We changed the DOM to use the right "flex-direction" value.

- "(Both will be sent by email)" appears when you select a customer
  and ask an invoice.
  This text was positioned in absolute to be aligned to the bottom right
  on the input. This can't work when you have a scroll bar like on mobile.
  So we now simply use "text-align: right".

- Email input was too small on mobile.
  To fix this, we decided to only keep the icon and remove "Send" text.

Task ID: 2453679

X-original-commit: ce2c8414333ca3ae6a28da0c59502e44eb16980e
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné 0a6c027b94 [FIX] pos: payment-screen button UX on mobile device
- Icons (customer, invoice,...) are now displayed on mobile too.

- Pane buttons (Validate, Review,...) were too tall.
We now better see the content of the primary screen while being
able to click of these buttons.

Task ID: 2453679

X-original-commit: 61ede7cae6e074a9e4eb590ddd9bd126fb214d92
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné 8e1a4259a4 [IMP] pos: Show categories on mobile
Before this commit, users had to use a popup window to change
the product category. It wasn't clear for users who are used
to using a large screen.

This commit adapts the breadcrumb navigation to be the same
as on desktop. This avoids the use of this popup.

We also improve the display of products by taking the entire width
of the screen. This allows us to add some space between the products.

Task ID: 2355025

X-original-commit: 9b7d1d6f9ef1342db5bb0d6a31eafa9d2586d171
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné a2ddef022f [IMP] pos_*: Ticket/Order kanban screens on mobile
Using a list view isn't the best way to display data on small screen.
We had to change this behavior to display a kanban view of orders.

We also merge design of "Ticket" screen and "Order Management" screen.

Task ID: 2453679

X-original-commit: d0e53721a97c14419a2f81ef8aa8be317cc5644a
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné a4b617dd95 [FIX] pos: Move "back" button in the action pad
When you clicked on "Review", there were not enough space to
properly check the order lines.
The "back" button took a lot of space in this screen.
Additionally, it shouldn't be the primary button in this view...

It's why this button has been moved in the action pad, next to the
payment button.

Task ID: 2453679

X-original-commit: 1418c9f10c80bea6393b47d5ffc1e0217ad1d4ba
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7334cd3086 [FIX] pos_restaurant: Reduce "Back to Floor" button size on mobile
The "back to floor" button is currently too big to be used on mobile
To fix this we have no choice but to display the table number only.
It would be good practice for this number to be unique; we will fix
the demo data in master branch.

This also fix a misalignment between arrow and text.

Task ID: 2453679

X-original-commit: 31dc371c824cee431072788faafb7f1dfd4a1335
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 360a1168cb [FIX] pos: Improve UX on New Orders page on small screen
The top of new order page is currently unusable because it's too large
for small screens.

To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

We also had to reduce the font size and paddings to keep filters next
to the search input. As it doesn't change much in desktop, these
changes are also applied for larger screens.

Task ID: 2453679

X-original-commit: 8f4202de307911e4ea54af6c018de87dd94086b6
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7594c055de [FIX] pos,pos_restaurant: Improve UX on Search products on small screen
The top of POS is too large and must be scrolled to be used.
To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

Task ID: 2453679

X-original-commit: e5d54ac1d30eef789ec1604e3a1212f415224ada
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
Romain EstievenartandAdrien Dieudonné 3a9bd22ffb [FIX] pos: Improve status-buttons UX on small screen
- Show user avatar logo on desktop and mobile.
  We are now able to know which employee is currently connected on mobile.
  The user name is still shown on desktop but didn't appear for small device.

- Add "sign-out" icon on desktop and mobile.

- Remove label strings like "Close", "Orders" and the username to
  gain some space; the icons will do the job.

- Remove "close_button" unused class

Task ID: 2453679

X-original-commit: 551ef472ec42965af38f68343b9fe50ea7ec4c88
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
John Laterre (jol) d4823e4067 [FIX] base_address_city: allow conservation of existing required attributes
Currently, the _fields_view_get_address() method replaces the field
'city' and all of its attributes.

That causes problems for attributes that are defined
in other previously installed modules.

This fix allows the 'required' attributes to be conserved.

closes odoo/odoo#79447

X-original-commit: 1ac8b5a40440e6c4fddc0e088064ea1a706d93ab
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2021-11-05 18:59:44 +00:00
Odoo's Mergebot be5332fe55 [FW][MERGE] project: Project Sharing feature follow-up
This PR are the follow-up of #73341 PR to fix the various points to finalize the feature for the v.15.

These points are done only in the Project Sharing feature:
- remove import button in favorite menu
- remove some filters in search view and update the search view
- add uom in session to use timesheet_uom widget for timesheets: this widget uses the uom stored in the session to display the unit_amount in hours or in day format.
- remove the using of avatar widget for employees.
- remove checkboxes in list view.
- change label for group by user_ids
- not set by default the height of the chatter
- remove the 'Set a cover' button in kanban view because the portal user has no access to `ir.attachment` model.
- add unit tests for project sharing feature.
- force staying in the project sharing form view when the user wants to see a subtask.
- display subtask planned hours
- allow the portal user to edit priority task when he is in project sharing feature.
- show "Assign to me" button
- see custom kanban state label
- get all options when the chatter is reloaded in project sharing.

In classic portal views:
- use task in sudo for classic portal form view

General point:
- prevent click on avatar user when `noOpenChat` is `true`

task-2633229

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#79429

Forward-port-of: odoo/odoo#77156
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-05 18:33:40 +01:00
Daniel Reis c4dbd18418 [FIX] purchase: display POs maching same commercial partner
The "Auto-complete" bills field does not show all POs for the Vendor that are waiting for invoices.

To reproduce the issue:

    - Create PO1 Vendor = "Supplier"
    - Create PO2 Vendor = "Supplier, John Doe"
    - Create Invoice for PO2
    - In the PO2 Invoice, "Auto-Complete" field try to select PO1, but it is not shown.

The "Auto-complete" bills field should show all POs for the Vendor that are waiting for invoices.
The problem is that the field's domain filters is using the partner_id
field when it should be using teh commercial_partner_id.

opw-2684409

closes odoo/odoo#79438

X-original-commit: d3002116e665d799ba11b9f94e4b45bc4c39bde5
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-05 16:51:54 +00:00
Aurélien (avd) f74eb30709 [FIX] mrp: restrict _post_process_scheduler search domain
stock.orderpoint._post_process_scheduler confirms
productions after procurements have been run.

This was introduced to avoid conflict between
procurements, conflicts that can happen e.g. in
the purchase_mrp module.

However, currently action_confirm might
also be called on done or cancelled productions.
That can happen if there are already been lots
of procurements for the same product/orderpoint,
i.e. MO with the same values have been created multiple times.

To avoid this, add ('state', '=', 'draft' in the search_domain.

opw-2666960

closes odoo/odoo#79437

X-original-commit: 11c7b92f90804a4d73833e22c071e1665058fbdb
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-05 16:51:51 +00:00
Xavier BOL (xbo) 708861ed3d [IMP] project: manage column_invisible in project sharing list
Before this commit, it was impossible to to hide a column when the
timesheets or subtasks features are not enabled to the project shared.

This commit manages the column_invisible for the list view in project
sharing to compute the domain in this modifiers. We assume all tasks
displayed in project sharing are linked to a project shared.

task-2633229

closes #77156

X-original-commit: ab2b5d1fd1f09d804ab410bc326cfebf26d5a7c6
2021-11-05 17:16:13 +01:00
Xavier BOL (xbo) fbac7f191d [FIX] project: exclude project sharing assets qweb from web.assets_qweb
Before this commit, we import all xml in project module. The problem is
the ones for project sharing should not be included in `web.assets_qweb`.

This commit excludes the project sharing assets from `web.assets_qweb`.

task-2633229

closes #77156

X-original-commit: 21e21d7956d6de1775f4230060cdff7c39015bbc
2021-11-05 17:16:09 +01:00
Xavier BOL (xbo) d3b8d1fd31 [FIX] project: remove 'Share with all users' checkbox in project sharing
Before this commit, the portal user could see the checkbox in search
view to share his favorite item with all users. This action is not
authorize in project sharing feature and should be removed.

This commit removes this checkbox to avoid the portal user to share his
favorite item with others users.

task-2633229

closes #77156

X-original-commit: 19b38074dd8bfe4d8347db31f946beeb2850d453
2021-11-05 17:16:05 +01:00
Xavier BOL (xbo) c2e8148368 [FIX] hr_timesheet: fix access error when load_views in project sharing
Before this commit, when the user chooses to encode in 'Days', the
timesheets, when a collaborator accesses to the project sharing feature
for a shared project. This collaborator has an access error because he
does not have any access to `uom.uom` of the current company. Indeed, we
use this uom to change the label of `unit_amount` field for
timesheets linked to this project shared.

This commit fetches the name of the encoding for the current company in
sudo to change the label of `unit_amount` field of timesheets during
the load_views of project sharing feature.

task-2633229

closes #77156

X-original-commit: 575315744a31a975208c82f72403ecebf3585f37
2021-11-05 17:16:01 +01:00
Xavier BOL (xbo) f7bcc14d25 [FIX] hr_timesheet: show total_hours and progress if allow_timesheets
Before this commit, those columns are not invisible if the project has
not allow_timesheets enabled (or not allow_subtasks for "Total Hours"
field) in list view of project sharing feature.

This commit changes the attrs of those field to hide the column if the
domain is satisfied.

task-2633229

closes #77156

X-original-commit: 3856024d037a86a07703cc492f7cc41be93169de
2021-11-05 17:15:58 +01:00
Xavier BOL (xbo) 95c0fe5729 [FIX] project: favorite menu in project sharing
Before this commit, when the collaborator clicks on the favorite menu,
he has a traceback because the 'spreadsheet' service is not available.

Since we don't want to use this service and we just want the menu item
to save the current as favorite. This commit override the favorite menu
to remove the registry items to add the menu item and we just add the
one we want.

task-2633229

closes #77156

X-original-commit: d970c13494db2c3e085155b7855b656fbbe26467
2021-11-05 17:15:54 +01:00
Xavier BOL (xbo) 614657d799 [FIX] project: show 'Assign To Me' only if the user is not assigned
Before this commit, when the task has a user assigned to a task and the
current user wants to assign himself to this task. He cannot see the
'Assign To Me' button because this button is only visible if the
`user_ids` field is empty.

This commit changes the visibility of this button to show this button
only if the current user is not yet assigned to the task.

task-2633229

closes #77156

X-original-commit: cfba241bada2b3690b4303b7e01747301925d162
2021-11-05 17:15:47 +01:00
Xavier BOL (xbo) adf3aca403 [FIX] project: use task in sudo for classic portal task view
Before this commit, when the portal user has access to a project and a
task has a customer who is not in the same company than the portal user,
the portal user has a AccessError when he wants to consult this task.

This commit uses the task in sudo to have the same information shown in
/my/task/<id of the task>.

Steps to reproduce:
------------------
1. Share in readonly mode a project to the portal user (with
visibility set to 'portal')
2. Create a task in this project and set a Customer A (a customer who
has not the same company than the portal user).
3. Log in as portal user (Joel Willis).
4. Go to '/my/projects' and select the project shared.
5. Select the task created.

Actual Behaviour:
----------------
AccessError exception is displayed because the portal user has no access
to partner in other company than his yours.

Expected Behaviour:
------------------
Display the task portal form view like the one shown in /my/task/<id of
the task created>.

task-2633229

closes #77156

X-original-commit: 3b0d6d0cef73baa5b5f235c3518c8bd698c81e21
2021-11-05 17:14:46 +01:00
Xavier BOL (xbo) aeac9052b8 [FIX] portal: get all options when we reload the chatter
Before this commit, we use the defaultOptions and the options passed in
parameter of the `_setOptions` method, but we could have any unupdated
options in the `this.options`.

This commit creates a new object with the defaultOptions and the options
containing in `this.options` before update this object with `options`
given in parameter to have the new `this.options`.

task-2633229

closes #77156

X-original-commit: 5d1a36bdd530d4037d4f29dc607907d79d18dcc6
2021-11-05 17:14:42 +01:00
Xavier BOL (xbo) c0c1af4ca2 [FIX] project: see custom kanban state label
Before this commit, the user could only see the default kanban state
label in kanban state label. That is, "Ready", "Blocked" and "Normal".

This commit allows to see the custom kanban state label in project
sharing feature.

task-2633229

closes #77156

X-original-commit: a9a884cfe1f8328ae71edc93832e4c4408d9c581
2021-11-05 17:14:38 +01:00
Xavier BOL (xbo) 9089dfef5e [FIX] project: allow edit priority task in project sharing
Before this commit, the `priority` field in task was in readonly in
project sharing feature.

This commit allows the `priority` field in task be edited by a portal
user in project sharing.

task-2633229

closes #77156

X-original-commit: 62572e17d6cd62f16287d530c247dbe9b8501e0c
2021-11-05 17:14:33 +01:00
Xavier BOL (xbo) 6e53c8e1d5 [FIX] hr_timesheet: display subtask hours in project sharing form view
Before this commit, the portal user cannot see the subtask planned hours
because the portal user has not the group implied by the res config
settings of Project App.

This commit removes the check of this group for project sharing feature
to only use the `allow_subtasks` field.

task-2633229

closes #77156

X-original-commit: 466ac140587811f1ca5c8a5f3960a40710ac635d
2021-11-05 17:14:30 +01:00
Xavier BOL (xbo) 5eddca2ace [FIX] project: force the project sharing form view for subtasks
Before this commit, when we do a fields_view_get in unit test, we get
the form view of project task view in backend and not the project
sharing form view in project sharing feature.

This commit adds in the context the `xml_id` of the form view used in
project sharing feature.

task-2633229

closes #77156

X-original-commit: 7dfb44e703f9ff8293412030cfd308e2545f121c
2021-11-05 17:14:26 +01:00
Xavier BOL (xbo) bd4acaa220 [IMP] project: add unit tests for project sharing feature
This commit adds unit tests to check the access of portal user. That is,
we check if the readable fields are only available in read access and
writable fields are available for the edition of the task.
We also check if the other fields in task model raise a AccessError if
the portal user wants to access to one of them.

task-2633229

closes #77156

X-original-commit: 1e7185bcdd8913c006148466dec260b8f6d53c0b
2021-11-05 17:14:19 +01:00
Xavier BOL (xbo) 0f24225bbe [FIX] project: remove the set a cover button in project sharing
Before this commit, we add the Set a cover image in the kanban view of
task for portal user in project sharing feature. However, the portal
user has not access to `ir.attachment` model. So, those users cannot
selects a cover image for a task.

This commit removes this button in project sharing feature.

task-2633229

closes #77156

X-original-commit: 2f8bb52c942416528de4d7d95c53e0ac1c99bf5b
2021-11-05 17:13:43 +01:00
Xavier BOL (xbo) 8f84155337 [FIX] project: not set by default the height of the chatter
Before this commit, the border left displayed when the chatter is aside
the task form view is not from the top to the bottom of the page in
project sharing feature.

This commit removes the fit-content set to the height in css to have the
border left displayed from the top to the bottom as expected in project
sharing feature.

task-2633229

closes #77156

X-original-commit: 886bc7577b2d6f437c28ea18e5786b36930a7cc2
2021-11-05 17:13:24 +01:00
Xavier BOL (xbo) 4c12d0410d [FIX] project: remove checkboxes in list view for project sharing
Before this commit, the portal user can select multiple tasks in the
list view with the checkboxes but no action is available.

For this reason, this commit removes these checkboxes.

task-2633229

closes #77156

X-original-commit: cef79697a014c6443c1d1dfdcf498c18fcb27fb9
2021-11-05 17:13:19 +01:00
Xavier BOL (xbo) 596a676984 [FIX] hr_timesheet: remove avatar widget on employee_id of timesheets
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
2021-11-05 17:13:14 +01:00
Xavier BOL (xbo) 7beaa04201 [FIX] sale_project: remove the SO stat button in project sharing
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
2021-11-05 17:12:15 +01:00
Xavier BOL (xbo) 150686947b [FIX] project,hr_timesheet: add uom in session to use widget
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
2021-11-05 17:10:15 +01:00
Xavier BOL (xbo) 0b8961a963 [FIX] project: search view in project sharing feature
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
2021-11-05 17:09:53 +01:00
Xavier BOL (xbo) d04b1c2abc [FIX] project: remove import button in favorite menu for project sharing
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
2021-11-05 17:07:49 +01:00
Adrien Widart 9320b1b4f1 [FIX] pos_restaurant: submit order lines only once
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

closes odoo/odoo#79436

X-original-commit: 75fb0aa6e9c314b61b30d49b5c463fa126dfc835
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-11-05 16:03:07 +00:00
Florian Damhaut df28381992 [FIX] mrp : Auto-fill Number of SN for mass produce
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

closes odoo/odoo#79431

X-original-commit: 38e5d002acc2e516987acc0afe38648473fff708
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-11-05 16:02:59 +00:00
Vincent Larcin d12c747002 [FIX] sale_timesheet: remove empty sections from project updates
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

closes odoo/odoo#79415

X-original-commit: 0741dde0598186d395a06ab6a9ea7056f0ff00ff
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-05 14:32:47 +00:00
Tiffany Chang (tic) b57f155075 [IMP] stock: add missing 'res_model' for auto-open reception report
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#20805

closes odoo/odoo#79408

X-original-commit: a966e9d122b6fa91906260e82eaea1ed720bd076
Related: odoo/enterprise#22122
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-11-05 13:48:51 +00:00
Tiffany Chang (tic) a44dda1a90 [IMP] stock: conditionally show "Allocation" (reception report) button
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
2021-11-05 13:48:51 +00:00
Tiffany Chang (tic) 9a67190e3e [IMP] stock: improve buttons for reception report
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
2021-11-05 13:48:50 +00:00
Tiffany Chang (tic) 1c97b75c97 [IMP] mrp,stock: always show product in reception report labels
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
2021-11-05 13:48:50 +00:00
Tiffany Chang (tic) 23ef79f69b [IMP] stock: link to source origin in reception report
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
2021-11-05 13:48:50 +00:00
Adrien Widart aef496fce3 [IMP] stock: display the SM's date on picking form
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

closes odoo/odoo#79413

X-original-commit: 845f5bdde594f37d42ad12adcbe9489b1b64bd83
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-05 13:00:50 +00:00
oco-odoo 2f893dd79b [FIX] l10n_es: check if chart of account is installed in migration
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!

closes odoo/odoo#79323

X-original-commit: b7d21a93c9712d96340c5d57eaeb91bae80028b5
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-05 13:00:41 +00:00
Aktiv Software f0778bc462 [FW][FIX] sale: properly show order rejection feedback on sale portal
**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

closes odoo/odoo#79409

Forward-port-of: odoo/odoo#79207
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-11-05 11:45:38 +00:00
Raman Salihi 4cad597041 [FIX] base: use display_name instead of name in assert_log_admin_access
`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

closes odoo/odoo#79398

X-original-commit: 9d6f54e7f7219cbbda41129e35682f6a76aae1d4
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Raman Obaid Ahmed (raob) <raob@odoo.com>
2021-11-05 11:00:54 +00:00
Vincent Larcin b70752321a [IMP] project: add demo data for tasks in personal stages
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>
2021-11-05 11:00:41 +00:00