Commit Graph
276 Commits
Author SHA1 Message Date
Joseph Caburnay 123b705677 [FIX] pos_discount: pos app is stuck when changing the discount
To reproduce:
1. Install pos_discount and pos_coupon.
2. Start a session and add item to the order.
3. Add global discount.
4. Change global discount. Stuck.

This is because in some modules, get_orderlines is overridden. Instead
of returning the original object containing the orderlines, it returns
a different array instance containing the lines. This is the reason the
while loop is stuck. With this change, whether get_orderlines return the
container or a copy, we are sure that it won't be stuck in the for loop.

closes odoo/odoo#81011

Task-id: 2697861
X-original-commit: 6d78748794a2db3f324312fc773f7a48fd0ffba4
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-12-07 19:27:40 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Jacky (trj) 13843f8545 [IMP]: point_of_sale UI: NumberPopup and NumberBuffer can pre-select input which will change the value upon triggering a key
The user doesn't need to delete the current input before changing it. He can now write
hiw new value which will erase the current one.
The guest popup from the `pos_restaurant` module and the global discount popup from the
`pos_discount` module benefit from this and have their input pre-selected.

Before: when opening the guest or discount popup, the user always has to delete the curent
value before changing it. Let's say that the current value was `5`, the user needs to either
press the `Delete` or `Backspace` button/key before entering his new value.

After: the user doesn't need to press the `Delete` or `Backspace` button/key and can now directly
enter his new value

Task ID: 2419637
2021-02-25 09:47:50 +00:00
Pierre Masereel cd61b662e7 [FIX] point_of_sale: discount product with tax
When you are using a discount product with a tax, you get a traceback
when trying to add the discount. It is caused by a typo and is fixed
here.

closes odoo/odoo#63550

X-original-commit: b389dcabf49fd05c5239d68fd26ef4239963a7e5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-12-17 16:14:08 +00:00
Joseph Caburnay 18b5efb42d [IMP] point_of_sale,pos_*: replace 'save' buttons
Replace save buttons in each module field in pos.config with a message.
Saving the pos.config form when a module_ or group_ field is modified
will reload the page.

closes odoo/odoo#51535

Related: odoo/enterprise#10669
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-09-17 07:54:03 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Nicolas Martinelli f3f07434f6 [FIX] point_of_sale, pos_discount: install discount when session open
Commit 4c4adf472453de65e45e fixed the `pos_discount` installation in
case of a session is already opened. However, this breaks the following
condition:

https://github.com/odoo/odoo/blob/8aa952d18acca5a0ac3b32579e812158e641c13c/addons/point_of_sale/views/point_of_sale_dashboard.xml#L67

The `current_session_id` is always filled in for any user, so the badge
is not shown anymore.

We can keep the same logic than the mentioned commit but without
impacting the computation of `current_session_id`.

closes odoo/odoo#53412

closes odoo/odoo#53858

X-original-commit: 7e0e89cbf5d09c106936a582e27af527535103f6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-30 10:18:22 +00:00
Antoine Prieels 1759a17c0e [IMP] point_of_sale: Hide tips and discount products
Hide the tips and discount products from the ProductScreen.

TaskID: 2276054
2020-06-12 12:13:22 +00:00
Pierre Masereel eabbd3558f [REF] pos_discount: migration to OWL framework 2020-05-12 12:52:23 +00:00
Andrea Grazioso (agr-odoo) f0afe7420a [FIX] pos_discount: correctly get discount amount
Activate a language which has comma as decimal separator
Go into POS settings, activate 'Global Discount'.
Open POS session, add some product and use global discount.
Input some number with decimals and confirm.
Discount will be not applied

This occur because of javascript type coercion:
 Math.min(100, "11.0") -> 11
 Math.min(100, "11,0") -> NaN

So in locales with thousands separator the statement would produce
different results. Forcing float parsing fix the issue

opw-2243482

closes odoo/odoo#50900

X-original-commit: 84a6c2a59c59b88b0ad7b1f9112d331fa2a505c5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-05-08 09:31:12 +00:00
Pierre Masereel a8b803c26b [FIX] point_of_sale, pos_discount: install discount when session open
Whe a pos session is opened, it is impossible to install discount
anymore, because the module tries to set a default value for the product
discount.

To fi this error, we are setting the default value, only on config that
are closed.

closes odoo/odoo#48576

X-original-commit: 4c4adf472453de65e45e71f0cbd22a36ef2ed0db
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-30 09:24:35 +00:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Robin Heinz 1a3dcfeae6 [FIX] point_of_sale: default global discount
Change the default value of the miscellaneous product to a discount product. When the module pos_discount is installed, the default value will now be the discount product.

closes odoo/odoo#36665

Task: bug fix
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-13 13:45:51 +00:00
Pierre Masereel 11b23d3771 [FIX] pos_discount: don't show multiple prices
When you add a discount, the price is changed on the product, and so
when you have enabled options to display the discount, the product is
shown as discounted. So we are modifying the lst_price too (like for
tip) to avoid having differences between prices.

closes odoo/odoo#37089

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-18 14:20:25 +00:00
Martin Trigaux be5d48ef1d [FIX] *: correct typos, improve wording
Courtesy of translators

closes odoo/odoo#36953

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-16 13:45:52 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Pierre Masereel e09d7d1b25 [FIX] pos_discount: get price based on total without tax
When you are applying a discount, the base amount is the one tax
included which is wrong as we'll apply the tax of the discount product
on it. So we are basing the discount computation on the total without
taxes and then apply the tax configured on the product.

It doesn't work with multiple taxes, but will be handled in future
developement in odoo.

closes odoo/odoo#36798

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 14:17:50 +00:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Pierre Masereel ab0a207a59 [FIX] point_of_sale: force load discount product
When you set up a discount product on your pos config and also some
available categories, it is possible that the discount product is not
loaded in the point of sale, which lead to an error.

Now we are forcing the loading of the discount product to allow using it
even if it is not in the allowed categories, as we don't want to create
a discount product for each category if we want to use both features.

TASK-ID: 2057436
2019-08-27 09:31:31 +00:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
Christophe Simonis bfd34e14b1 [MERGE] forward port branch saas-12.3 up to 40e8b67179 2019-07-26 15:12:29 +02:00
Martin Trigaux a98427834e [MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c2
closes odoo/odoo#35119

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 10:32:23 +00:00
Martin Trigaux e266c7c98a [MERGE] Forward port of 12.0 to saas-12.2 up to 5e4c1b3701 2019-07-23 13:41:00 +02:00
Odoo Translation Bot 72339a5301 [I18N] Update translation terms from Transifex 2019-07-21 01:18:28 +02:00
Christophe Simonis 5e81b18e24 [MERGE] forward port branch saas-12.3 up to 0247d2f35f 2019-06-27 20:45:52 +02:00
Christophe Simonis 6c5783bd5a [MERGE] forward port branch saas-12.2 up to 465909f0fd 2019-06-27 19:10:09 +02:00
Christophe Simonis 465909f0fd [MERGE] forward port branch 12.0 up to cd21c016b0 2019-06-27 18:01:07 +02:00
Nicolas Martinelli 7670c6c80a [FIX] pos_discount: change customer
- Enable general discounts for POS
- Create a POS session
- Add a product
- Create a general discount of 10%
- Change the customer

The discount is reset to the product price.

When changing the customer, the prices are reset:

https://github.com/odoo/odoo/blob/3b1699e02d4483913159681bf7e10839e6493244/addons/point_of_sale/static/src/js/screens.js#L1251

In the case of a global discount, the price is therefore reset to the
product price in:

https://github.com/odoo/odoo/blob/3b1699e02d4483913159681bf7e10839e6493244/addons/point_of_sale/static/src/js/models.js#L2304

To avoid this, we set the price as manually set. Conceptually, this is
indeed the case since we manually chose the percentage, therefore the
price.

opw-2009761

closes odoo/odoo#34416

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-27 11:51:54 +00:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Odoo Translation Bot 48a9f5a633 [I18N] Update translation terms from Transifex 2019-06-16 06:15:35 +02:00
Martin Trigaux 52936ec260 [I18N] *: export saas-12.3 source terms
closes odoo/odoo#34068

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-06-12 12:39:50 +00:00
Odoo Translation Bot 15187da85a [I18N] Update translation terms from Transifex 2019-06-02 06:06:25 +02:00
Odoo Translation Bot befd048b33 [I18N] Update translation terms from Transifex 2019-05-19 06:07:44 +02:00
Odoo Translation Bot b25fdb25b5 [I18N] Update translation terms from Transifex 2019-05-19 01:16:49 +02:00
Odoo Translation Bot 1b932b339a [I18N] Update translation terms from Transifex 2019-03-24 06:23:04 +01:00
Odoo Translation Bot c924356d9e [I18N] Update translation terms from Transifex 2019-05-05 01:35:12 +02:00
Odoo Translation Bot 3ac23bef79 [I18N] Update translation terms from Transifex 2019-04-28 01:34:21 +02:00
Odoo Translation Bot 3f50c16d5a [I18N] Update translation terms from Transifex 2019-03-31 01:32:20 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Odoo Translation Bot 77692a84be [I18N] Update translation terms from Transifex 2019-03-03 01:36:23 +01:00
Odoo Translation Bot 917ad03026 [I18N] Update translation terms from Transifex 2019-02-24 01:37:50 +01:00
Odoo Translation Bot a463a87189 [I18N] Update translation terms from Transifex 2019-02-17 01:33:04 +01:00