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
closesodoo/odoo#108308
X-original-commit: 4f5f5750b05873f0ddce7fe862686202a2725563
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#107889
X-original-commit: 1f496609ecd2a7afdac53f4a622895bbe5b6cb81
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#107961
X-original-commit: 6b12c64e09c92fba96532658f959daf7d234223c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
add documentation link for adyen terminal in point of sale settings, similar to the other payment terminals
closesodoo/odoo#107900
Related: odoo/enterprise#34948
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
*: 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.
closesodoo/odoo#107621
Related: odoo/enterprise#34910
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#107241
X-original-commit: b1e1ae315e7ff3e22e7533a602cea0e150eafb75
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#107398
X-original-commit: 6280e5ac921b21d10100cd78a18072120d823aca
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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)
closesodoo/odoo#107350
X-original-commit: b7b8809ea8b7fe4ac8b24f43fe3f3a5e38a66696
Related: odoo/enterprise#34713
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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"
closesodoo/odoo#107330
X-original-commit: f39d96d6d9fb0c5f80188504d47523461c1b4ba2
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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.
closesodoo/odoo#107240
X-original-commit: 69d78de90af451a5268020335c568ffef6b1c4a0
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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.
closesodoo/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>
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
closesodoo/odoo#106835
X-original-commit: 36dc1fce19403935770eaaaf5c1177fc8c1ef2bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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
closesodoo/odoo#106484
X-original-commit: b743e736f764fd7d6e232d2c8eaf6b2e314c5f31
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
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
closesodoo/odoo#106352
X-original-commit: 4bf9627fc49439012198d9194859429bc0db89fa
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
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.
closesodoo/odoo#106044
X-original-commit: 3f7d6833b8c85a0c3469eced160bd72884c18d22
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#105829
X-original-commit: ac6a7c7c34c0e4d4b4d7c7dcfb2d939a70a5bf09
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#97803
Signed-off-by: Masereel Pierre <pim@odoo.com>
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.
closesodoo/odoo#105582
X-original-commit: 2426c26a0fbbb2d5e50203922cb64f9001ac73e0
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Due to bc8d7590c04a0f1391021c8d1354f1eabca9742c, the error popups were mistakenly removed.
closesodoo/odoo#105567
X-original-commit: 954d733668f1028fa5ec8471c3cf3a6a6a8246b9
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
Prior to this commit, when we clicked on an article, it would flicker on
mobile.
This commit fixes this issue.
task-3058162
closesodoo/odoo#105200
X-original-commit: ec41980851fb98da25a06de3ef79cfcb152ab5dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
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.
closesodoo/odoo#104363
X-original-commit: 49381e5f821368c0c4d6e20207ce7d51abbe8be0
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this PR when you select a pos.payment in custom, it raise.
It doesn't make sens to use api.model here
closesodoo/odoo#104615
X-original-commit: 2abeb8cc5b015263ce49d765315712f92ec25c25
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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.
closesodoo/odoo#104391
X-original-commit: b0df10c1e497f65b891f7141055e7f339d11b4b1
Signed-off-by: Masereel Pierre <pim@odoo.com>
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.
closesodoo/odoo#104233
Part-of: odoo/odoo#96583
X-original-commit: 7d1e52bcd11a1c20a6c6829c56d3fabe5b0f0fef
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#103838
X-original-commit: b616cad62a66aaaf8bfc7c79dbafd87174b9a1f6
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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.
closesodoo/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>
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
closesodoo/odoo#103684
X-original-commit: 6968c7761ef7b564950b9a672ee875975d249c83
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Small error where the method is not called on the right object
closesodoo/odoo#103283
X-original-commit: 269b89ddfe9f8f6b03552ca4f5c57a889fbe9ac0
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#103569
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#103589
X-original-commit: 15f586b3dec5c951b10a7eea5aca219ad466da9b
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#103548
X-original-commit: 8c76afc161133b78239cf91d746a159d67f67c4e
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
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.
closesodoo/odoo#103514
X-original-commit: eadaa267c689415eeaacaeba23c663b95a1d12d2
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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
closesodoo/odoo#103365
X-original-commit: 860103130fd5de880d9b179f5e1218107f4be0de
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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.
closesodoo/odoo#102957
X-original-commit: 7e237dd6282ecd9ebe95690e445466acbab26ca5
Signed-off-by: Masereel Pierre <pim@odoo.com>
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.
closesodoo/odoo#102581
X-original-commit: a34c9ab209c7859ed500fb44d580cc546e56bd37
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
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.
closesodoo/odoo#102513
X-original-commit: eeb66a815310b6a7870915e53f446e6b1f0180f6
Signed-off-by: Masereel Pierre <pim@odoo.com>
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.
closesodoo/odoo#102519
X-original-commit: 3450e48198c6dd1c26379ffd09aeaaaefa1fdc13
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>