Commit Graph
6969 Commits
Author SHA1 Message Date
pedrambiria eeba794d2d [FIX] point_of_sale: prevent JSON modification in init_from_JSON
Before this commit: after calling the `init_from_JSON` of the order line,
the `pack_lot_ids` would be changed. It will cause a problem if this
function is called before sending the JSON to the backend or saving it.

The solution is to copy its value and prevent it from changing.

opw-3088922

closes odoo/odoo#108308

X-original-commit: 4f5f5750b05873f0ddce7fe862686202a2725563
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-20 09:25:31 +01:00
Ahmad Khanalizadeh 11e4d452d4 [FIX] point_of_sale: fix product search domain
This PR (https://github.com/odoo/odoo/pull/105748) introduced a bug
by having an extra `OR` operator in the domain.

This commit fixes the error.

opw-3099849

closes odoo/odoo#107889

X-original-commit: 1f496609ecd2a7afdac53f4a622895bbe5b6cb81
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-19 11:33:41 +01:00
Maruan Aguerdouh (magm) 4d719a4ef8 [FIX] point_of_sale: total banner have proper background in refund of products
Steps to reproduce:

- Go to Point of Sale app.
- Create a new order with many items in it (until you need to scroll).
- Go to Orders > Click on 'All active orders' and select 'Paid'.
- Scroll throught the items in the right.

Issue:

The total summary has a transparent background, so it will overlap with
the items inside the order and make less clear to visualize the total.

Solution:

Added the `background: inherit` to the `summary` class in the
pos.scss so we get the right background that we need for this view.

FW - port: master

opw-3093131

closes odoo/odoo#107993

X-original-commit: 3edd7f5cc425d991c512e278c22ee44043bc9d86
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2022-12-14 22:04:17 +01:00
Merel Geens (mege) 0a273651d2 [FIX] point_of_sale: prevent closing a POS session multiple times in a
row

When it comes to closing POS sessions, both the frontend and the backend
currently have some way to prevent the same operations from executing
simultaneously because of repeated clicks. `closeSession` in the
frontend has a `closeSessionClicked` boolean that prevents the operation
 from triggering multiple times at once. `close_session_from_ui`
in the backend checks if the session state isn't already `closed`.

A flaw in the current logic is that
`update_closing_control_state_session`, which is called by the frontend
before `close_session_from_ui`, doesn't check the session state before
writing it to be `closing_control`. This means that if you time things
in such a way that the `closeSession` logic in the frontend triggers
again right after it finishes, it will call
`update_closing_control_state_session` and `close_session_from_ui`
again, which will happily close the session again, duplicating stock
moves and account moves resulting from it.

This fix has `update_closing_control_state_session` check if the session
is already closed and raises a UserError if so. This prevents the
duplicate closings and records from happening.

There were two variants in the UI I observed when the issue occurred:
the first is when the repeated execution of
`update_closing_control_state_session` and `close_session_from_ui`
successfully finished. In that case the session would be closed with
duplicate stock moves and journal entries.

In the second variant, from the repeated calls only
`update_closing_control_state_session` executed but not
`close_session_from_ui`. This could happen if the timing of the
frontend was such that it redirected to the POS dashboard before it was
able to call `close_session_from_ui`. In that case, the session would
be in the `closing_control` state, which is visible in the POS dashboard
. If the user then closed the session, it would be closed twice and the
duplicate records would again be created.

opw-2988701

closes odoo/odoo#107961

X-original-commit: 6b12c64e09c92fba96532658f959daf7d234223c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-14 17:18:03 +01:00
Edoardo (pied) 3c32cca783 [FIX] point_of_sale: add forcecreate="0" pos_config_main
Without this change, upgrades would generate the `pos_config_main`
record even in dbs with otherwise-well-organized structure.

Also, it might cause issues[^1] hard to solve otherwise.

[^1]: https://upgrade.odoo.com/web#active_id=421039&cids=1&id=421039&menu_id=107&model=upgrade.request&view_type=form

closes odoo/odoo#107935

X-original-commit: ac99271e206fa07e7fdf1b57e2279058dbb9d141
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-14 15:36:51 +01:00
niyasraphy 5c1b0a1385 [IMP] point_of_sale: documentation link for adyen terminal
add documentation link for adyen terminal in point of sale settings, similar to the other payment terminals

closes odoo/odoo#107900

Related: odoo/enterprise#34948
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-12-14 11:42:18 +01:00
Samuel Degueldre 990b10aece [REF] point_of_sale, *: convert legacy modules to ES odoo modules
*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer,
pos_epson_printer_restaurant, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_restaurant_adyen, pos_restaurant_stripe, pos_sale,
pos_sale_product_configurator, pos_six, pos_stripe

We are about to refactor most of the Javasript code base of the point of
sale and related modules. In doing so, we will move a lot of files and
modernize the entire code-base. In order to avoid diffcult rebases,
their conversion to odoo-modules is done as a first step to avoid
getting lots of conflicts on files that were unindented, which marks the
entire file as being in conflict. Conflicts will occur during forward
ports but they will be easier to manage as the changes will be much
smaller in scope, and the author will have the context of the change
that causes the conflict in mind when dealing with it.

closes odoo/odoo#107621

Related: odoo/enterprise#34910
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-14 11:41:52 +01:00
Laurent Smet 990cce2b1b [FIX] point_of_sale: Fix account_bank_statement access rule
The field pos_session_id has been moved from account.bank.statement to account.bank.statement.line. See:
https://github.com/odoo/odoo/commit/7e23eda02fc00b4e4a85e3a71b14fb1081441a04

closes odoo/odoo#107744

X-original-commit: 9e7174475d3da0d238f105ca0603f1a0539ef1b1
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-12-13 13:51:40 +01:00
niyasraphy 89c95544d6 [FIX] *: make some user errors translatable
*: base, account_payment, l10n_ar, mrp_subcontracting, point_of_sale, pos_restaurant, purchase, sale

closes odoo/odoo#107264

X-original-commit: edd928cd0c63a01d1ee8b28ed344f61e9b6d0b54
Related: odoo/enterprise#34676
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-09 11:48:50 +01:00
niyasraphy 81a31d547c [FIX] point_of_sale: pos report wizard o2m tree width
in the wizard of sales report in point of sale module, the one2many tree's width is more than the screen size due to given col=4 and scrolling option is shown.

Point Of Sale -> Reporting -> Sales Details

closes odoo/odoo#107241

X-original-commit: b1e1ae315e7ff3e22e7533a602cea0e150eafb75
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-09 09:44:20 +01:00
roen-odoo d06528728d [FIX] point_of_sale: avoid overpayment if no cash method configured
Current behavior:
If the PoS has no cash method configured, and you try to make a
payment with a greater amount than the due amount, you will get an
error message. Because you cannot give money back to the customer as you
have no cash method configured.

Steps to reproduce:
- Remove Cash payment method from the PoS
- Open a PoS session
- Create an order with some products
- Pay the order with a greater amount than the due amount
- Validate the order, you will get an error message

Solution:
If the Pos has no cash method configured, and the user try to make a
payment with a greater amount than the due amount, we will automatically
set the amount to pay to the due amount and show a message to the user.

opw-3061612

closes odoo/odoo#107398

X-original-commit: 6280e5ac921b21d10100cd78a18072120d823aca
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-12-07 18:29:36 +01:00
lejeune quentin b49e7e48f5 [IMP] hw_*: Add possibility to run IoT in Windows
Currently it is only possible to run the modules
for the IoT Box on Raspios.
The modifications brought by this commit brings the possibility
that the various hw_* modules can be executed whatever the OS
of the hardware (Linux or Windows).
If the modules should be versioned according to the OS,
the file will be renamed so that the end of
the file includes *_L (for linux) or *_W (for windows)

closes odoo/odoo#107350

X-original-commit: b7b8809ea8b7fe4ac8b24f43fe3f3a5e38a66696
Related: odoo/enterprise#34713
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-12-07 10:02:23 +01:00
Jacky (trj) 149d5a9972 [FIX] point_of_sale: picking breadcrump display name
When clicking on the picking smart button through the `pos.order` and the `pos.session` views,
the displayed name shown was "To do" instead of "Pickings"

closes odoo/odoo#107330

X-original-commit: f39d96d6d9fb0c5f80188504d47523461c1b4ba2
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-06 17:12:16 +01:00
Achraf (abz) c18b0c7e32 [FIX] point_of_sale: Prevent traceback if opening cash is empty
A TypeError traceback that occurs in `set_cashbox_pos`
was caught by Sentry.

If the user validates the openingCash with an empty input, the
clientside code sends an empty string instead of a number to the python
code which interprets it as a number.

https://github.com/odoo/odoo/blob/84347b43063fc3032da3e03b49fc57375d8324fc/addons/point_of_sale/models/pos_session.py#L1480-L1485

opw-3089337

closes odoo/odoo#107303

X-original-commit: 62f0117c0f5fad1cd435c65986d477432de00dfa
Signed-off-by: Achraf <abz@odoo.com>
2022-12-06 17:12:05 +01:00
niyasraphy 397c7d7245 [FIX] point_of_sale: total field label alignment
Total field label in the point of sale order form view is not aligned well in the footer.

Point Of Sale -> Order -> Orders, open any existing records. label is not aligned properly in the form.

closes odoo/odoo#107240

X-original-commit: 69d78de90af451a5268020335c568ffef6b1c4a0
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-06 10:52:42 +01:00
niyasraphy 5dd5dd2669 [IMP] point_of_sale, l10_nl: change openerp tag to odoo
change the openerp xml tag to odoo in point_of_sale and l10_nl module

closes odoo/odoo#107191

Related: odoo/enterprise#34636
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-12-05 14:04:02 +01:00
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
roen-odoo 80656a2672 [FIX] point_of_sale: recompute reward after pricelist change
Current behavior:
In the PoS if you apply a coupon on an order that contains 2 products
with different taxes, it will create 2 discount lines on the order.
If you change the pricelist, the discount lines won't have the correct
values.

Steps to reproduce:
- Create 2 different products with different taxes.
- Create a pricelist with a discount on the 2 products.
- Create a coupon that apply a 100% discount on the order.
- Start a PoS session
- Add the 2 products to the order and apply the coupon.
- The order total is now 0€.
- Change the pricelist to the one with the discount.
- The order total is different than 0€.

opw-3049098

closes odoo/odoo#106835

X-original-commit: 36dc1fce19403935770eaaaf5c1177fc8c1ef2bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-11-30 14:05:46 +01:00
Brice bib Bartoletti 55f1a6ecd7 [FIX] account,pos,stock_account:add/update indexes
1) forward-port of this PR: https://github.com/odoo/odoo/pull/97000
   commit: c9209664ce3a4b10142bba4da6afb912afc983c2

2) use btree_not_null instead of simple btree for space optimisation

closes odoo/odoo#106484

X-original-commit: b743e736f764fd7d6e232d2c8eaf6b2e314c5f31
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2022-11-24 23:18:44 +01:00
Abdelouahab (abla) ae9d917c89 [FIX] point_of_sale: fix customer name overflow
To Reproduce
============
- start a session on pos
- on customer button create new one with a long name
- go back to pos dashboard, the name of the chosen customer goes outside of the button

Solution
========
a style was added to the button so that the long string is divided on multiple lines

opw-3074503

closes odoo/odoo#106352

X-original-commit: 4bf9627fc49439012198d9194859429bc0db89fa
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-11-23 18:15:48 +01:00
CarmenMiranda fa9d207e67 [IMP] point_of_sale: Send Context Closing POS Session
Sending a context when you are closing a `pos.session` will allow you to
make some validations/actions only when the closing is being done from the UI.
For example, sending values for new fields or a message that includes
something from the pos, like the Cashier ID, name, etc.

Also, it will help more when it is necessary to inherit the function in a
simpler way, to avoid having to overwrite it.

closes odoo/odoo#106044

X-original-commit: 3f7d6833b8c85a0c3469eced160bd72884c18d22
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-18 15:01:08 +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
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
Jacky (trj) d0f89b3478 [IMP] point_of_sale,pos_*: back to basics
Overall improvement and simplification (along with some minor re-alignment)
for the point of sale.

POS Dashboard:
- added a new check for companies that hasn't installed any chart of account,
this gives them a better understanding of the real problem.
- added a new `menuitem` in the configuration tab that list all the pos configs,
this gives the user a way to access the sub-config of a pos (and indirectly give
access to its whole settings)

Opening/closing control:
- the `MoneyDetailsPopup` is now opened through the `showPopup` method, we're
no longer using the css to show/hide.
- the details of the money (if it exists) is now given to the `MoneyDetailsPopup`
component, this allows to have a record data usable of the details and
the user doesn't have to start from scratch if he just wants to modify
one thing
- opening the `MoneyDetailsPopup` no longer resets the cash input, that way the
user can just quickly check if everything is correct again without having
to recount everything and this won't reset the outcome

Customer display:
- added "Powered by" before the Odoo logo in order to accentuate that
it's from the software used is from Odoo

Product screen:
- visual improvement of the `EditListInput` component which is mostly
used by the lot/serial number, it gives more information to the user
and better UX
- "Cash out" is now automatically selected upon opening the
`CashMovePopup`. No more minus sign (-) in the input amount. This
should give better intuitiveness and one less click to do
- no more clear search button shown if the search input is empty
- removed the hover and clickable effect on `CashierName` component
in the normal point_of_sale since nothing happens when we click on it
- increased the width of the click zone with a label in the
`ProductConfiguratorPopup` which makes it easier to select a radio input
- the `PrintBillButton`, `SplitBillButton`, `RewardButton` and
`ResetProgramsButton` are now disabled when nothing happens
- the `textarea` of the `TextAreaPopup` component has been fixed
and is no longer resizable

Partner list screen:
- fixed phone, mobile and mail icons the contact area
- increased details button size

Floor screen:
- when idle, no longer redirect to the floor screen if there's
an open error popup. An error popup is opened for a specific
reason, we shouldn't redirect while having this open or
automatically close it. Other kinds of popup will be
closed since those are issued by the user that went away.

task-2916197

closes odoo/odoo#97803

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-11-14 12:03:51 +01:00
lejeune quentin 0055e3cda0 [FIX] pos_six: Fix the use_strict in the timapi.js library
In V16.0 it is currently no longer possible to use the POS
if the pos_six module is installed
This bug is a combination of 3 factors

1. the new assets: a single file contains all the JS files, concatenated.

2. one of these files contains the instruction "use strict",
which stiffens the code of the function in which this is mentioned,
and which prevents certain syntactic approximations
(like calling a variable without seeing it declared, this case)

3. We added Sha1, in its file of course, but not in its own function,
the use strict then applies to the entire asset file

This reverts commit e08858e5ed02fe74160dabd6a91e1de88640956f.

closes odoo/odoo#105582

X-original-commit: 2426c26a0fbbb2d5e50203922cb64f9001ac73e0
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-11-13 21:54:40 +01:00
Jacky (trj) 408d573e08 [FIX] point_of_sale,pos_sale,l10n_fr_pos_cert: add error popups back
Due to bc8d7590c04a0f1391021c8d1354f1eabca9742c, the error popups were mistakenly removed.

closes odoo/odoo#105567

X-original-commit: 954d733668f1028fa5ec8471c3cf3a6a6a8246b9
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-10 22:22:01 +01:00
Jorge Pinna Puissant 4f24e34b39 [IMP] test_lint, *: eslint remove caughtErrorsIgnorePattern from no-unused-vars
Unused catch block arguments are now forbidden even when prefixed with an
underscore:  if the argument on the catch block is not needed, the use of the
optional catch binding is enforced.

Part-of: odoo/odoo#105433
2022-11-09 16:08:07 +01:00
Brieuc-brd f4cd175131 [FIX] point_of_sale: flicker of the active article
Prior to this commit, when we clicked on an article, it would flicker on
mobile.

This commit fixes this issue.

task-3058162

closes odoo/odoo#105200

X-original-commit: ec41980851fb98da25a06de3ef79cfcb152ab5dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-11-08 10:40:10 +01:00
Thibault Delavallée 892ff87c51 [FIX] l10n_ae_pos: avoid string-based xpath
Being text-based is a bad idea. Better have clear nodes to fetch in original
XML.

closes odoo/odoo#104686

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-11-02 11:38:38 +01:00
rhe-odoo d7ac037de5 [FIX] pos_restaurant: don't clean orders with paiements
When you have orders that have paiement and not lines anymore they can
be removed from the local storage if the screen is refreshed.

That may lead to loss of paiements.

closes odoo/odoo#104363

X-original-commit: 49381e5f821368c0c4d6e20207ce7d51abbe8be0
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-11-02 11:38:33 +01:00
Florent de Labarre e2fe70495a [FIX] point_of_sale : wrong api
Before this PR when you select a pos.payment in custom, it raise.
It doesn't make sens to use api.model here

closes odoo/odoo#104615

X-original-commit: 2abeb8cc5b015263ce49d765315712f92ec25c25
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-31 14:34:02 +01:00
niyasraphy 28ff040602 [FIX] point_of_sale: redirect to correct settings
Since the settings in POS have been moved to the general settings, we
have two way to access those general settings. First throug the general
settings, second when you open the shortlist of settings editable by
every pos manager and follow the link to the general ones.

In the second case, when we arrive into the general settings, the
settings displayed are not always the one of the POS config you come
from, because by default it only show the settings of the latest pos
config editted.

So we are now checking if we are comming from a pos config to display
the correct one.

closes odoo/odoo#104391

X-original-commit: b0df10c1e497f65b891f7141055e7f339d11b4b1
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-28 10:17:54 +02:00
niyasraphy 03a855d30e [FIX] point_of_sale: pos_config_ids field label
closes odoo/odoo#104342

X-original-commit: 27ff3e0f64f53caa62c3022bd3b7c41e29a8e721
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-28 10:17:52 +02:00
rhe-odoo a0639cd152 [IMP] point_of_sale: error handler belgian blackbox
This commit aims to handle the belgian blackbox error properly just as the sweden blackbox do.
Add an error code of 701 to handle the error messages.

closes odoo/odoo#104233

Part-of: odoo/odoo#96583
X-original-commit: 7d1e52bcd11a1c20a6c6829c56d3fabe5b0f0fef
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-27 14:41:11 +02:00
roen-odoo 029fa85831 [FIX] point_of_sale: fix traceback in pos_order studio
Current behavior:
If you try to edit the form view of pos.order in studio, you get a
traceback.

Steps to reproduce:
- Install point_of_sale
- Go to PoS order
- Click on studio
- Click on the button to edit the form view
- You get a traceback

opw-3008565

closes odoo/odoo#103838

X-original-commit: b616cad62a66aaaf8bfc7c79dbafd87174b9a1f6
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-24 13:05:54 +02:00
pedrambiria 92e04dea0c [FIX] point_of_sale: reset number buffer when the select order line
Before this commit: if you add two products in PoS and try to change the quantity
for the first one, it works fine, but when you click on the other order line and try to
update the quantity, it uses the previous number buffer.

The solution is to reset the number buffer after selecting the order line.

closes odoo/odoo#103834

Issue: https://github.com/odoo/odoo/issues/103230
X-original-commit: 51f6a6798ce2cc3c23a2fc55280cbd1a80df6bec
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2022-10-24 09:16:45 +02:00
Jacky (trj) 503213e3cf [FIX] point_of_sale: duplicate message in the chatter session
Due to the 7e23eda02f change, cash control is now
independent of accounting and is only done in the Point of Sale. A mistake was made
in the refactor, a message was sent in the bank statement and in the session before.
Now we don't use the bank statement chatter so it should only be sent to the session

closes odoo/odoo#103684

X-original-commit: 6968c7761ef7b564950b9a672ee875975d249c83
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-21 09:17:01 +02:00
Jacky (trj) 314e463c2f [FIX] point_of_sale: call method on right object
Small error where the method is not called on the right object

closes odoo/odoo#103283

X-original-commit: 269b89ddfe9f8f6b03552ca4f5c57a889fbe9ac0
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-21 09:16:56 +02:00
lejeune quentin e032acc44e [IMP] point_of_sale: Add the possiblity to enable auto validate order
Actually if the customer pay with a electronic payment method the order
is automatically validated.

With this commit we add the possibility to activate or not this functionality

closes odoo/odoo#103569

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-20 11:18:45 +02:00
Goffin Simon af6178e628 [FIX] point_of_sale: Payment term 30% Now, Balance 60 Days not supported in POS
Steps to reproduce the bug:

- Let's consider a customer C with default sale payment term 30% Now, Balance 60 Days
- Go to the POS and open a session
- Select a product and set C as customer
- Click on Payment and select Cash and check Invoice

Bug:

A traceback was raised because several account move lines are created.

opw:3009062

closes odoo/odoo#103589

X-original-commit: 15f586b3dec5c951b10a7eea5aca219ad466da9b
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-20 09:21:03 +02:00
Victor Piryns (pivi) 44d4c65560 [FIX] point_of_sale: open POS sessions with restricted categories
Current behaviour:
We get a traceback when opening a POS session with restricted categories

Expected behaviour:
We should be able to start a POS session with restricted categories.

Steps to reproduce:
- Install POS
- In POS global settings add any category in the restricted categories
- Try opening a new POS session

Reason for the problem:
Incorrect domain right leaf, the reference field that is a pos.category
is not de-referenced.

Fix:
Add `.ids` at the tail end of the record reference

Affected versions:
- 16.0
- master

opw-3021490

closes odoo/odoo#103548

X-original-commit: 8c76afc161133b78239cf91d746a159d67f67c4e
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-10-19 18:06:53 +02:00
Jacky (trj) 2b4a060b96 [FIX] point_of_sale: hidden product search bar
The search bar could be hidden when there was no categories in the PoS. This
was due to the new design where the search bar has been moved to the categories bar.

closes odoo/odoo#103514

X-original-commit: eadaa267c689415eeaacaeba23c663b95a1d12d2
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-19 15:12:49 +02:00
Walid HANNICHE (waha) 6c903ddf53 [FIX] point_of_sale: group split taxes on product info
Steps to reproduce;
Create a tax with two accounts that take 50% each.

Bug:
In the info tab on the pos of a product with the tax
the tax will show as two lines.

Fix:
group taxes with the same id

opw-3006360

closes odoo/odoo#103365

X-original-commit: 860103130fd5de880d9b179f5e1218107f4be0de
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-18 13:17:16 +02:00
Nicolas Martinelli fbcec9e1f8 [FIX] mrp, mrp_subcontracting, point_of_sale: proper override
The overrides of the method have an incorrect signature [1] leading to
a crash.

[1] https://github.com/odoo/odoo/blob/1903f7aa2553b555b58df066f584feb4caf25e71/addons/stock/models/stock_warehouse.py#L1016

closes odoo/odoo#103149

X-original-commit: 46737295655a0d2280809a80f5bff45644410fc7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-10-12 14:19:48 +02:00
Romain Estievenart 06948a763e [IMP] *: adapt bundle to support dark mode switch
This commit adapt all bundle to support dark mode

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
stefanorigano (SRI) d53d432361 [IMP] *: adapt for dark-mode
*: hr, hr_holidays, project, purchase, point_of_sale, rating,
spreadsheet_dashboard, stock, survey

This commit adapts modules and components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
Pierre Masereel f5c31545db [FIX] point_of_sale: fix electronic payment style
When an electronic payment is done in the POS, the payment lines
contains the status of the electronic payment and the corresponding
button to perform actions.

We are now correctly display those informations.

closes odoo/odoo#102957

X-original-commit: 7e237dd6282ecd9ebe95690e445466acbab26ca5
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-11 11:07:45 +02:00
rhe-odoo 9e6315924e [FIX] point_of_sale: close session from pos config
There was a traceback when closing the session from the pos config.
Step to reproduce:
 1. Open a session
 2. Go to the pos config
 3. Try to close the session

 This commit allows the user to close the session from the config.

closes odoo/odoo#102581

X-original-commit: a34c9ab209c7859ed500fb44d580cc546e56bd37
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-07 14:37:06 +02:00
Pierre Masereel 8eb19d12c3 [FIX] point_of_sale: payment screen style
Since new desaign made in point of sale, the payment screen has a HUGE
numpad. Payment buttons and other buttons on this screen are too small
to be easily touched on a touchscreen.

We reduce the space take, by the numpad and give more space to other
buttons to make the interface more usable.

closes odoo/odoo#102513

X-original-commit: eeb66a815310b6a7870915e53f446e6b1f0180f6
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-10-07 11:13:06 +02:00
Eleftherios Kritsotakis 0e038ffba3 [FIX] point_of_sale, pos_stripe: broken payment methods form view
In this commit we the fix the payment methods form view
because it was broken after changing the implementation
of the <group> element to the new `grid`format.

closes odoo/odoo#102519

X-original-commit: 3450e48198c6dd1c26379ffd09aeaaaefa1fdc13
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-06 23:14:19 +02:00