Commit Graph
28 Commits
Author SHA1 Message Date
Theo VINCENT (thvi) 24ee5de588 [IMP] pos_restaurant, *: share payment methods
*: point_of_sale

 - Makes the default shop and restaurant use the same default payment methods except cash payment methods that are individual.
 - Adds a default cash payment method to the default restaurant.

closes odoo/odoo#126953

Task-id: 3378032
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-27 14:56:53 +00:00
Saurabh Mishra 53c6d8e0bc [FIX] pos_restaurant: load only shop demo products when no restaurant
When the user using `point_of_sale` deletes pos restaurant and tries
to load demo products in pos shop then user will face error.

Note: Use db without demo data

steps to produce:
- Install `point_of_sale`.
- Point Of Sale > Configuration > Point Of Sales, delete pos restaurant.
- Point Of Sale > Shop > New Session, click on `our demo products`.

Error: `KeyError: 'name'`

After applying our commit, if the user clicks on `our demo products`
after deleting pos restaurant then the user would be atleast able to see
shop demo products and other demo products which are not part of
pos restaurant.

sentry-4399441443

closes odoo/odoo#135633

X-original-commit: feaf26db77fde9afae23c8b3c3ea2f0f441b4dae
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-25 11:30:10 +00:00
Theo VINCENT (thvi) 572ac8a01f [FIX] pos_restaurant: onboarding data loading
The onboarding demo data cannot be loaded since f96ea753f3.

Steps to reproduce:
 - Start a database without demo data (--without-demo=True)
 - Open a POS session for the default shop
 - Click to load demo (onboarding) data

An error is raised.
The error is due to a mistake in the XML, the food category logo is not assigned to the right record.

closes odoo/odoo#136392

Task-id: 3519677
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-25 09:38:43 +00:00
Adrien Guilliams (adgu) b72b1950d5 [FIX] point_of_sale: demo last order preparation change
This PR resolves a bug in the self linked to the demo data.

Steps to reproduce:

Create a new Restaurant session
Open mobile menu for Restaurant
Make an order in the mobile menu for a table
Reload the page where the open restaurant session is.
[BUG] The ball telling if an order is sent to the kitchen or notbecame black.
[EXPECTATION] The ball telling if an order is sent to the kitchen or not is red.

closes odoo/odoo#134777

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-09-21 16:52:09 +00:00
Adrien Guilliams (adgu) f96ea753f3 [IMP] point_of_sale, pos_restaurant: add images on demo categories
In this commit, we add images on demo categories to make the demo more
realistic but also change a bit the design of the category selector.

closes odoo/odoo#134621

Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-09-21 14:15:42 +00:00
Adrien Guilliams (adgu) 17d1a52f56 [IMP] pos*: Improve demo data
pos*: point_of_sale, pos_restaurant, pos_self_order

**Purpose:** This change is for better UX of the testers.

**Notable changes:**

1. Historical pos order data which include past sessions and past orders.
2. New open session and open orders.
3. Onboarding data containing all demo datas and the new open session
and open orders.
4. Adding more drinks demo products.

closes odoo/odoo#128699

Task-id: 2484444
Related: odoo/enterprise#44198
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-05 18:44:18 +00:00
Xavier Luyckx (xlu)andvlst <vlst@odoo.com>, Pedram (pebr) c087603d0b [REF] pos*: introduce bootstrap
pos*: point_of_sale,pos_discount,pos_hr,pos_loyalty,
pos_restaurant,pos_sale,pos_sale_product_configurator,pos_six

Prior to this commit, the point_of_sale module relied on custom CSS.

To enhance user experience, increase flexibility, and simplify maintenance,
most of the custom css was replaced in this PR with Bootstrap utility classes.

Task: 3354582
Authored-by:  Xavier Luyckx (xlu) <xlu@odoo.com>
Part-of: odoo/odoo#129544
Co-authored-by:  vlst <vlst@odoo.com>,  Pedram (pebr)
2023-07-28 16:28:45 +02:00
Theo VINCENT (thvi) 3236c1cb50 [IMP] pos_restaurant, *: default settings and data
*: point_of_sale, pos_self_order

Changes:
 - Adds a default restaurant with some default usual settings (with tips after payment if the company is in the United States) but no floor in the Point of Sale app. Makes pos_restaurant module auto installed with point_of_sale.
 - Makes some restaurant settings enabled by default (only for restaurants).
 - Adds loadable default demonstration data for onboarding (only when no real product is available in POS), specific to a restaurant. The default demonstration data for onboarding of point_of_sale and pos_restaurant are loaded together (if pos_restaurant is installed) to make it so an user that clicks to add demo data will have demo data for the default point of sale and also for the default restaurant (and the current restaurant if it is different than the default one). Makes the load demonstration data button visible when there is no product with a positive price available, because without that condition the tips (in restaurant) and discount were preventing the display of the button.
 - Hides the Preparation Printers menu item if there is no POS config using the printers.
 - Renames some labels.

Fixes:
 - Adds checks to always set set_tip_after_payment to False if a point of sale is no longer a restaurant or if the tips are disabled. This is needed because the code of pos_restaurant seems to be written considering that set_tip_after_payment is True only when the point of sale is a restaurant with the tips enabled (which wasn't guaranteed). Without that checks, some tests like ReceiptScreenTour fail. Another solution to make the tests successful without that checks would be to add !this.env.pos.config.module_pos_restaurant in pos_restaurant/static/src/js/Screens/PaymentScreen.js:16. But because other parts of the code only check the value of set_tip_after_payment, I think it is better to opt for the additionnal checks.
 - Fixes duplication of displayed product categories when loading demonstration data.
 - Fixes products before loading demonstration data that were kept and displayed after (discount for example).
 - Fixes categories and therefore communication with the preparation display after loading demo data in a restaurant.
 - Adds a check on the server side to prevent demonstration data loading when there is at least one valid product for POS.
 - Fixes order count display when "NaN" (in floors and tables view).
 - Fixes arguments of orm call for set_not_tip (model and method names were not given in the right order).

closes odoo/odoo#117941

Task-id: 2484291
Related: odoo/enterprise#39450
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-26 20:00:35 +02:00
vlst 42087c6fa1 [IMP] point_of_sale: Allow products to be part of multiple pos categories
Currently, a product can only be part of one `pos_category`.
This PR changes the relationship between the `product` and the `pos_category` from a `One2many` to a `Many2many`.

closes odoo/odoo#122907

Task: 3138825
Related: odoo/enterprise#41791
Related: odoo/upgrade#4739
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-21 13:45:50 +02:00
David Monnom (moda) a0aff5bda2 [IMP] pos_self_order: refacto, models and serverside price calculation
General refactoring of the codebase. Inline of certain components
that had no logic in the JS side, the XML of these components was
directly added to the place where they were called.

Simplification of the python controller, inline of many functions and
separation of the logic. There is now one function that manages new
orders and another that manages and updates existing orders if we are
in "pay after meal" mode. In "pay after each" mode, orders cannot be
edited.

Addition of different models, product, order and orderlines in order to
facilitate the use of these objects between the backend and the
frontend.

Added price calculation on the serverside because we can't trust the
data coming from the customer in the self since no identification
is required.

Management of last change sent added. Thanks to this, users will no
longer be able to click on the order button if no changes have been
made to the order.

closes odoo/odoo#122901

Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-06-16 14:59:31 +02:00
Loukas Wets (lowe) e3ad1eb058 [IMP] pos_restaurant: always floor plan when restaurant
Enable floor plan for all PoS Restaurant config. To accomplish this, we are
removing the following fields:
- `pos.config.is_table_management`
- `res.config.settings.pos_is_table_management`.

All access to `is_table_management` can be replaced by `module_pos_restaurant`
because originally, `is_table_management` can only be true if
`module_pos_restaurant` is true.

To adapt the tests, we should manually set `module_pos_restaurant` to `False` for
the `pos.config` used in tests outside `pos_restaurant` addon. This is because
when pos_restaurant addon is installed, it sets every new `pos.config` record to
be restaurant by default.

Task-3282975

closes odoo/odoo#120117

Related: odoo/enterprise#40532
Related: odoo/upgrade#4622
Signed-off-by: Monnom David (moda) <moda@odoo.com>
2023-05-11 12:01:35 +02:00
David Monnom (moda) 73aae73f1b [IMP] point_of_sale,*: move kitchen printer logic to point_of_sale
*:pos_epson_printer,pos_epson_printer_restaurant,point_of_sale,
pos_restaurant,pos_hr_restaurant

Before the printers only worked in the pos_restaurant and not in the
point_of_sale. Indeed, the methods managing the printers were located
in the pos_restaurant.

Now all these methods have been moved.
For the community part here are the affected modules:
- The methods in pos_epson_printer_restaurant have been moved to
pos_epson_printer.
- The methods in pos_restaurant have been moved to point_of_sale.
- The module pos_epson_printer_restaurant has been removed as it only
handled printers.

Some of these methods have been adapted/renamed to better suit
the needs.

This branch the first part of the following task: 3224508

closes odoo/odoo#114655

Related: odoo/upgrade#4414
Related: odoo/enterprise#37901
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-03 12:39:17 +02:00
David Monnom (moda) a9608cdf1e [IMP] pos_restaurant: swap payment and order button
Previously, the payment button was larger than the others and next to
the numpad. The other buttons were managed by a mixin and arranged
in a predefined order.

Now, the payment button only stays in place when the "order" button is
not present, currently it can only be present if the restaurant module
is installed and a printer configured.

When it is present, it takes the place of the payment button and the
latter is added to the mixins with the other buttons

closes odoo/odoo#115988

X-original-commit: f32c07f28e2fd2830f568757d4700fa77b83ced7
Related: odoo/enterprise#38476
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-21 18:56:15 +01:00
Adrien Guilliams (adgu) 53f9e5845f [IMP] point_of_sale, pos_restaurant: Add cross-orders feature for point_of_sale and pos_restaurant
Currently the below use-cases are hardly supportable, though quite common:

Retail: Sell product in one shop and return it in another one
Restaurant: Managing payment when having multiple checkout desks,
 and multiple waiters (only taking orders)

This because currently:

PoS orders are only known by the cashier desk (pos.config) they were created from
One floor map can only be linked to one cashier desk at a time

More over, with the Self-Service coming along the way
(where kiosk orders must be accessible from a cashier desk),
this need must be supported.

For restaurant, floor plans can be linked to multiple cashier desks,
ongoing orders are shared between trusted PoS config
(through floor plans for restaurant and according to
the setting "Trusted PoS config" for the retails),
and past orders can be accessible from any desks within a same DB.

closes odoo/odoo#109216

Related: odoo/upgrade#4393
Related: odoo/enterprise#37955
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-10 18:54:52 +01:00
Adrien Guilliams (adgu) ffe27c3f32 [IMP] pos_restaurant: Table not stacked when added
When we added tables on a floor plan from the floor screen,
the tables stacked one upon another which was confusing and annoying.
Now the table will be added on a free place on the floor plan.
We also rename the tables: they are no more called "T1", "T2"
but "1", "2",...

closes odoo/odoo#114282

Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-03-07 01:59:54 +01:00
pedrambiria 4e5d531067 [FIX] pos_restaurant: add a cash payment method to demo
https://github.com/odoo/odoo/commit/c6f8ab69a0eb521ef3fc9a31f5a08bd1097bf1b2
After this commit, when pos_restaurant is installed, no cash payment
method will be added.

opw-2765443

closes odoo/odoo#112890

X-original-commit: 67ba1c9d82c16152063f08e4782590e9bad3d97c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-02-16 16:58:52 +01:00
Joseph Caburnay 055dbc25a4 [IMP] point_of_sale,pos_restaurant: use company's barcode nomenclature
This change removes the `barcode_nomenclature_id` in the `pos.config`.
Each pos session now starts based on the company's barcode nomenclature.

closes odoo/odoo#93072

Task-id: 2849415
Related: odoo/upgrade#3575
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-06-21 09:17:50 +02:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Pierre Masereel a681631dd0 [IMP] point_of_sale: create one picking type by warehouse
When you are selling goods through point of sale, pinkings are created
to remove what have been sold from the stock. This picking is created by
using the picking_type set on pos_config.

For now, the there is only one picking type POS Order existing by
default, which is located on the first warehouse in data. It means that
if you create another warehouse and/or company, you will have to
manually create picking type if you want to be able to link pos config
to the new warehouse.

So now, each warehouse will have its own picking_type for POS, which
will ease the link between the pos config and the warehouse.

We've also set a default value on pos config to take the first picking
type, and added a domain that will show only the outgoing types.

TASK-ID: 1970513
2019-06-03 09:01:21 +00:00
Juhil Somaiya f50bdf5cb4 [IMP] sale,stock,...: Set weight on consumable/storable demo products
This commit is related to task id: 1915274

closes odoo/odoo#29279
2019-01-30 12:59:27 +00:00
lul-odoo cbc24cfa8e [IMP] point_of_sale,pos_restaurant: Improve demo data 2018-12-03 16:12:27 +01:00
Yannick Tivisse 3031ab8f0f [IMP] mrp,purchase,pos: Improve demo data
SPECIFICATIONS
==============

PoS
---

https://drive.google.com/a/odoo.com/file/d/1BkVVQTR7V_kZpNsOO0CwqTQtxAH9boLB/view?usp=drivesdk
Add new products : Cola, Water, Orange Juice (+ images)
in internal category : All/Saleable/PoS
available in PoS

Traceability
------------

The [FURN_9666] Table (MTO) should be tracked by serial number
There should be one purchase order already received for 1 Table Top
There should be one purchase order already received for 4 Table legs
There should be one MO done for the table (consuming the products received in the PO you've created)
> The goal is to have a complete traceability report for one table
Delete SN/LN : https://drive.google.com/a/odoo.com/file/d/1cxdE-2laGYaZ2rnSFKjEbVg6k6MVyLdw/view?usp=drivesdk

Assign crm.lead to the admin user : when opening the pipe, there must be some leads and opportunities

Products
--------

https://drive.google.com/a/odoo.com/file/d/1qaO7MlufZbj7bw6z5S8DtmKPYiK0sQNK/view?usp=drivesdk
route buy should be ticked on pedal bin product

remove some ecommerce categories: https://drive.google.com/a/odoo.com/file/d/1sgIJE49BHVDcoF5CXngbJAvWb2fN_3Wk/view?usp=drivesdk
2018-07-17 17:37:42 +02:00
Yannick Tivisse edd8bad5d9 [IMP] product,...: Improve demo data
* Update demo data sheet for barcode
* Modify product "Book: Office Renovation for Dummies:
    - Name: "eBook: Office Renovation for Dummies"
    - Image:
    - Internal category: All/Services/Saleable
* Tips internal reference
* Product 10.0 % Discount =
    - Name : "10.0% discount on total amount" (no space between 0 and %)
    - Internal reference : 10PERCENTDISC
* Free product - large cabinet
    - Should be a stockable
    - in category All/Saleable/Office Furniture
    - Name : Free Gift - Pencil Holder
    - Picture
* Desk Customizable :
    - Change its website sequence (should be displayed first in the shop)
* https://github.com/odoo/odoo/pull/25263
* Need to clean attributes and attribute values and attribute categories :
    - Attributes, keep : Brand, Color, Dimensions, Legs, Weight
    - Attribute Category : Rename Storage into "Material"
* Events
    - Suppress Functional Webinar and Technical Training
* PoS Categories :
    - Suppress
    - Create PoS Category : Desks (put desks in it)
    - Create PoS Category : Chairs (put chairs in it)
    - Create PoS Category : Miscellaneous (and put all other products in it)
* Products available in PoS
    - Remove : Air Flight, Car Travel Expense, Bpost domestic bpack 24h pro, Bpost World Express Pro, Customer Care, DHL USA Delivery, DHL USA -> International, Deposit, Expenses, Fdex International, Fedexs US, Hotel Accomodation, Restaurant Expenses,
* Product:
    https://drive.google.com/a/odoo.com/file/d/1KjxcB88aDfe8qAzIpFlkBmMj5ekA9eIf/view?usp=drivesdk
    Timesheet : description to update https://docs.google.com/spreadsheets/d/1nB8l8pFcRXRFnudgDJVyZZp3McaHNovlyvY0jE1ZZ54/edit?usp=sharing
* Project : less projects, more tasks
    Remove "Internal - GAP Analysis", "Internal Projects"
    Rename Support into After-Sales Services
    Task to rename: Data import + Doc ==> Office planning
    Move the task Internal Training from "Support" to "Office Design"
* AGR Project : add the following tasks and link it to the right SO line
    Decoration : SO Line ==> Senior Architect
    Planning :  SO Line ==> Senior Architect
    Furniture  SO Line ==> Senior Architect
    Furniture Delivery : not linked to an SO line
* Marketing Automation
    Partnership offer ==> to rename into "Commercial prospection"
    Steps to rename:
        Offer free trial ==> Offer free catalog
        After 7 days (if not yet partners) ==> After 7 days (if not yet customers)
    Message for sale person ==> keep the same
* Mass mailings:
    http://nimb.ws/zrKsZ9
    http://nimb.ws/CbNpwd
* Events:
    Suppress Functional Webinar and Technical Training
    Tracks to update : https://docs.google.com/spreadsheets/d/1sKkJrltXY3Gz7ue3mVysZxaWGybKpx5fIhgUBnhbNDs/edit?usp=sharing
* Helpdesk
    Rename team into Customer Care
    Create 2 tickets in default team
    Urgent : Kitchen collapsing (assigned to admin) : link to the task  SO053: [SERV_585189] Customer Care (Prepaid Hours)
    No pririoty : Where can I download a catalog ? (not assigned).  Ticket type = question
2018-07-12 13:58:45 +02:00
Fabien Pinckaers bed29a4aea [IMP] product: Unify/Clean product demo data
PURPOSE
=======

1. Unified product demo data
2. Less demo: one per use case
3. Demo data for all models

Specification
=============

1. Refactor all the brol in the demo data
2. Adapt the tests to make them green, as some products are
   renamed, removed, created in python instead of as demo data
   ...
2018-07-05 08:57:41 +02:00
Goffin Simon c487381dbf [FIX] pos_restaurant: Installing pos_restaurant with demo data
When installing the module pos_restaurant with demo data, the check boxes for
module_pos_restaurant and is_table_management must be checked.

opw:785943
2017-12-05 16:56:30 +01:00
Darshan Kalola 3de847afd8 [MIG] pos_restaurant : migration to new api
During migration, remove 'set_background_color' method, to directly use js api.
2016-05-31 09:20:11 +02:00
Darshan Kalola 65fce907f2 [MOV] pos_restaurant : reoganize module directory 2016-05-31 09:20:10 +02:00