Adrien Widart 0efc1b3384 [FIX] point_of_sale: allow user to close session
If a user has no accounting permission, when he opens/closes a POS
session (without any sale), he will not be able to close the session

To reproduce the error:
(Use demo data)
1. Remove all Marc Demo's permissions for the Accounting module
2. Login with Marc Demo
3. Open a POS Session
4. Close the POS Session

Error: "Sorry, you are not allowed to delete documents of type 'Journal
Entries' (account.move) [...]"

Note: if the user processes at least one order during the POS session,
he will be able to close it thanks to sudo mode:
https://github.com/odoo/odoo/blob/369331dfdc144cf852c80c99d00ce8d5da843be1/addons/point_of_sale/models/pos_session.py#L302

OPW-2523187

closes odoo/odoo#72516

X-original-commit: 766d03c84c1e51e000494d49265c32ab096d602e
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-22 09:30:49 +00:00
2015-09-08 15:45:09 +02:00
2015-09-08 17:58:38 +02:00
2021-05-17 19:26:27 +00:00
2020-09-28 14:07:25 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%