Skip to content
Snippets Groups Projects
  1. May 25, 2023
    • pedrambiria's avatar
      [FIX] point_of_sale: cash rounding combination of cash and bank · cf0ffeda
      pedrambiria authored
      
      There were two cases that caused the issue:
      Consider a cash rounding with Precision 5 and only cash.
      
      If you have an order that the total amount is 40 and pay 38 by
      bank and 0 with cash (cash rounding), it will raise an error.
      
      If you have an order that the total amount is 41 and pay 38 by
      the bank and 5 with cash, it will raise another error.
      
      opw-3302114
      
      closes odoo/odoo#121626
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      cf0ffeda
  2. Mar 29, 2023
    • roen-odoo's avatar
      [FIX] point_of_sale: display default pricelist price as base price · 9c18b121
      roen-odoo authored
      
      Current behavior:
      When a discount is applied on a product because of a pricelist. The base
      price is displayed without applying the default pricelist on it.
      
      Steps to reproduce:
      - Create product A with price of 10€
      - Create pricelsit PL1 that change price of product A to 7€(fixed price)
      - Create pricelist PL2 based on PL1 that use a formula to apply 10% on
        all products.
      - Change PoS default pricelist to PL1 and make PL1 and PL2 available on
        the PoS.
      - Open a PoS session and add product A to the order. Price should be 7€.
      - Apply PL2 on the order.
      - The product line shows that the price was 10€ has been discounted to
        6.30€. The base price should be 7€.
      
      opw-3200027
      
      closes odoo/odoo#116911
      
      X-original-commit: a515ce4be38b5074cf88b6c084c8cc418e5cc7d6
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
      9c18b121
  3. Mar 27, 2023
    • roen-odoo's avatar
      [FIX] point_of_sale: stop showing changes of fiscal position as discount · b93f6a93
      roen-odoo authored
      
      Current behavior:
      When a fiscal position was applied in the PoS, it was considered as a
      discount and was shown in the receipt and on the product screen.
      
      Steps to reproduce:
      - Create a product with a price of 10€ with 15% tax included in the
        price
      - Create a fiscal position that map the 15% tax to 0% tax
      - Open a PoS session
      - Add the product to the order
      - Apply the fiscal position
      - The price of the product is now 8.70€ but the order show it as a
        discount of 1.30€ (e.g 10€ -> 8.70€).
      
      opw-3154499
      
      closes odoo/odoo#116053
      
      X-original-commit: bbccf240f0dae32694ca2ff69fc180ab12bd932b
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
      b93f6a93
  4. Feb 28, 2023
    • roen-odoo's avatar
      [FIX] point_of_sale: correctly round total due in payment screen · 3086e18f
      roen-odoo authored
      
      Current behavior:
      When you make a purchase that should be rounded down, for example 1.97
      rounded down to 1.95. On the payment screen if you select a payment
      method and pay with a greater amount than the base amount. The total due
      would be rounded incorrectly to 2.00 instead of 1.95.
      
      Steps to reproduce:
      - Create a product with a price of 1.97
      - Set a rouding down method of 0.05
      - Open a pos session
      - Add the product to the order
      - Select a payment method, for example cash and enter an amount greater
        than the base amount, for example 5.00
      - The total due will be 2.00 instead of 1.95
      
      opw-3175726
      
      closes odoo/odoo#113428
      
      Signed-off-by: default avatarHeinz Robin (rhe) <rhe@odoo.com>
      3086e18f
  5. Feb 21, 2023
  6. Feb 03, 2023
    • Abdelouahab (abla)'s avatar
      [FIX] point_of_sale: rouding half up gives wrong value · 9f8c69c6
      Abdelouahab (abla) authored
      
      To Reproduce
      ============
      - set cash rounding method to half-up with a value (1 for example)
      - create a product available on pos with price (1.61$ in my example)
      - on pos select this product and proceed to payment with cash
      - with 2$ cash the total will be 1$ and change 1$ which is wrong
      
      Problem
      =======
      - the function responsible on applying the rounding method doesn't take into
      account the rounding method `"HALF-UP"`
      
      Solution
      ========
      - update the function to apply `"HALF-UP"` correctly
      
      opw-3143698
      
      closes odoo/odoo#111469
      
      Signed-off-by: default avatarabla001 <abla@odoo.com>
      9f8c69c6
  7. Jan 18, 2023
    • rhe-odoo's avatar
      [FIX] point_of_sale: price list test · a94bec19
      rhe-odoo authored
      
      This commit fix the test when different localisation are used to make sure that the public pricelist is used.
      Before, when pos_pricelist test was done and some localisation were installed, it could lead to test failure because the default pricelist wasn't correct on the partners.
      
      closes odoo/odoo#109691
      
      X-original-commit: 53e942fd
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      a94bec19
  8. Jan 09, 2023
    • roen-odoo's avatar
      [FIX] point_of_sale: rounding of refund orders · c92074e8
      roen-odoo authored
      
      Current behavior:
      When a refund order is created, the amount is not rounded the same way
      as the orginial order.
      
      Steps to reproduce:
      - Create a rouding method with 0.05 as rounding value, with the DOWN
        rounding method
      - Create an order with a product of price 1.98
      - Validate the order, the price should be 1.95
      - Create a refund order for the previous order
      - Validate the refund order, the price should be -1.95 but it's -2.00
      
      Solution:
      Always act like the order has a positive amount, and apply the rounding
      the normal way. Then apply the sign of the original order.
      If the remaining amount has a different sign than the original total,
      we should invert the rounding method to apply a rounding in the same
      "direction" as the original order.
      
      For example :
      - Original order is -1.98
      - Rounding is applied and the total is -2.00
      - After the payment, the remaining is -1.98 - -2.00 = 0.02
      - Wich will be rounded to 0.05 wich is not correct, it should be rounded
        to 0.00. So we invert the rounding method to apply a rounding in the
        same "direction" as the original order. If we don't do this the total
        due would have been -1.95 instead of -2.00. And the change would have
        been 0.05 instead of 0.00.
      
      opw-3106656
      
      closes odoo/odoo#108859
      
      Signed-off-by: default avatarHeinz Robin (rhe) <rhe@odoo.com>
      c92074e8
  9. Dec 07, 2022
    • roen-odoo's avatar
      [FIX] point_of_sale: avoid overpayment if no cash method configured · 6280e5ac
      roen-odoo authored
      
      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#107365
      
      X-original-commit: ff6bb9d362aefc64770c09b3ddd741106d301af3
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      Signed-off-by: default avatarEngels Robin (roen) <roen@odoo.com>
      6280e5ac
  10. Sep 07, 2022
  11. Aug 25, 2022
  12. Aug 08, 2022
    • Jacky (trj)'s avatar
      [IMP] point_of_sale: visual improvement · a5207452
      Jacky (trj) authored
      
      Small visual changes that should improve the user experience.
      The loading demo data popup has been moved to the backend.
      Created an Alert Popup that is less aggressive than an Error Popup
      
      closes odoo/odoo#83780
      
      Task-id: 2485062
      Related: odoo/enterprise#26104
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      a5207452
  13. Jul 08, 2022
    • aliya's avatar
      [IMP] account: refactor account types · 26b2472f
      aliya authored
      
      Task: 2856281
      
      - Remove user_type_id, account.account.type model, internal_type
      - Add account_type that is a simple selection field
      - Move internal_group and include_initial_balance to account.account
      - Because of these changes, type_control_ids on account.journal is also removed
      
      closes odoo/odoo#93212
      
      Related: odoo/documentation#2223
      Related: odoo/upgrade#3595
      Related: odoo/enterprise#28205
      Signed-off-by: default avatarCedric Snauwaert <csn@odoo.com>
      26b2472f
  14. Jul 01, 2022
    • pedrambiria's avatar
      [FIX] point_of_sale: wrong fixed taxes sign for zero amount products · ae28f029
      pedrambiria authored
      
      Before this commit: If a fixed tax is used for a product with the price
      of zero, the tax line sign would be positive and lead to an unbalanced
      move. The solution is to use its sign in its context for correct
      calculation.
      Also, in the PoS front-end, when you want to return a zero amount
      product with a fixed tax, its sign would be positive, which is
      incorrect.
      
      Steps to reproduce the first issue:
      
      	- Install 'Point of Sale' module
      	- Create a new 'Tax' X with a fixed price (e.g.: 1 $)
      	- Create a new 'Product' with zero Sales Price
      	- Create a PoS session
      	- Add the product to the order
      	- Close the session
      
      	It creates a line for the "Difference at closing PoS session," and
      doesn't prevent closing. But the problem is that the tax capture as
      debit is incorrect. The tax for the invoice must be credit.
      
      Steps to reproduce the second issue:
      
      	- Install 'Point of Sale' module
      	- Create a new 'Tax' X with a fixed price (e.g.: 1 $)
      	- Create a new 'Product' with zero Sales Price
      	- Create a PoS session
      	- Add the product to the order
      	- Change the quantity to -1 (refund)
      
      	The final amount is positive, while it should be negative.
      
      Solution
      
      	The sign must be sent in the context, and for the PoS front-end, it
      should consider zero amount cases.
      
      opw-2833590
      
      closes odoo/odoo#95067
      
      X-original-commit: c5fb4f778db95fb33845b9a5e0c2190d4d9037ee
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      ae28f029
  15. Jun 21, 2022
  16. Jun 03, 2022
  17. Dec 08, 2021
  18. Aug 31, 2021
    • Joseph Caburnay's avatar
      [IMP] point_of_sale,pos_*: combine ticket and management screens · a2ff6d53
      Joseph Caburnay authored
      We are referring to TicketScreen and OrderManagementScreen.
      The two screens almost serves the same purpose. There is not much reason
      to keep them separate. We combine the two in this commit. Basically,
      we remove OrderManagementScreen and its components. Some are kept and
      moved to the TicketScreen.
      
      Task-id: 2481404
      Part-of: odoo/odoo#75322
      a2ff6d53
  19. Aug 27, 2021
  20. Aug 03, 2021
  21. Feb 17, 2021
    • wan's avatar
      [FIX] point_of_sale,pos_hr,pos_coupon: adapt tests for localization builds · 82c75aef
      wan authored
      Part of task 2124952
      
      By using AccountTestInvoicingHttpCommon, we have a setup independant
      from the demo datas. This also prevents running tests with incompatible
      localization: the tests for l10n with another currency than USD failed
      because of the demo datas preventing the change of currency.
      82c75aef
  22. Nov 03, 2020
  23. Sep 02, 2020
    • Joseph Caburnay's avatar
      [FIX] point_of_sale,pos_restaurant: remove step_delay in pos test tours · d8e210e8
      Joseph Caburnay authored
      
      Tours with `step_delay` potentially hide errors because of missing tour steps.
      This is mainly caused by unfinished renders within the `step_delay` between
      two steps. It is possible that the render after the 1st trigger is not yet
      finished but the 2nd step trigger already existed in the screen. Because the
      render result of 1st step is late and the 2nd step is already triggered, the
      3rd step will fail. Note that the 3rd step will occassionally fail because
      render of the 1st step is most of the time faster than step_delay but
      there is no guarantee that the render is always faster because of occassional
      cpu slow downs.
      
      Runbot will eventually catch these tour errors which it did with the ticket
      screen tour.
      
      In this commit, we removed the `step_delay` in the pos tours. We also
      supplemented the missing step in the ticket screen tour which was the cause
      of random runbot error when there was `step_delay`.
      
      We also figured that value property of input element is not observed by the
      tour service's mutation observer, which result to an indeterministic error
      in a step in tip screen. To fix this, we introduce an attribute to the input
      element which is used in the step trigger.
      
      closes odoo/odoo#56961
      
      X-original-commit: 2ef73bb6
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      Signed-off-by: default avatarJoseph Caburnay (jcb) <caburj@users.noreply.github.com>
      d8e210e8
    • Antoine Prieels's avatar
      [IMP] point_of_sale, pos_*: Enable HTTPS in POS · 3f138b9d
      Antoine Prieels authored
      
      HTTPS had been disabled on SaaS to allow the use of the IoT Box that
      had no valid SSL certificate. As of V13.0, IoT Boxes connected to
      Enterprise DBs have a valid certificate. POS can then use HTTPS.
      
      Nginx is configured to redirect all requests to `/pos/web` to HTTP,
      so we change the POS URL to `/pos/ui`, except when using a Six
      payment terminal as it only works in HTTP.
      
      closes odoo/odoo#56933
      
      Taskid: 2191878
      X-original-commit: 8aee4992
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      Signed-off-by: default avatarAntoine Prieëls <aprieels@users.noreply.github.com>
      3f138b9d
  24. Aug 19, 2020
  25. Aug 17, 2020
  26. Aug 05, 2020
  27. Jul 30, 2020
  28. Jul 17, 2020
  29. Jul 15, 2020
    • Joseph Caburnay's avatar
      [FIX] point_of_sale: invoicing error at first invoiced order · 473cab3a
      Joseph Caburnay authored
      
      To reproduce, open a pos session. Finalize an order with invoicing.
      Error message is shown.
      
      Invoicing in pos calls doAction of the action manager. The first time
      doAction is called, it triggers a chain of events and a side effect
      of that chain is to instantiate two mail owl components which isn't
      possible because not all mail assets are loaded. A very quick fix is
      to bypass that mentioned chain of events by setting isStarted flag to be
      true. Aside from bypassing the instantiation of mail components, there
      are procedures that were skipped as well which includes:
      
      1. setting the bus to listen to scroll events
      2. setting odoo.isReady to true
      3. adding a class to the action manager element
      
      All of the above is not important in pos and can be skipped so this
      quick fix is valid. However, this fix doesn't actually solve the real
      problem which is the fact the pos is loading unnecessary assets.
      
      This commit implements the quick fix. Cleaning up pos assets will be
      done in the future.
      
      closes odoo/odoo#54478
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      473cab3a
  30. Jun 26, 2020
  31. May 26, 2020
  32. May 12, 2020
  33. Nov 22, 2019
    • Pierre Masereel's avatar
      [IMP] base: add unique constraint on ir.property · e85faf39
      Pierre Masereel authored
      
      There is no unique constraint on the properties to avoid having two
      properties for the same field, company and res_id.
      
      Having two properties for the same field, company and res_id, leads to
      inconsistencies through the code, as reading a company-dependent field
      nondeterministically returns one of the available property value.
      
      So now, before creating a property, we have to check that there is not
      already a value for the field, company and res_id and write or create
      depending on if it is already exists.
      
      The properties of specific records already satisfy the constraint thanks
      to the implementation of company-dependent fields that use the method
      `set_multi`.  We added a method `set_default` to set generic properties,
      and its implementation does the right thing.  It also simplifies the
      code to set such properties, by the way.
      
      closes odoo/odoo#40473
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      Co-authored-by: default avatarRaphael Collet <rco@odoo.com>
      e85faf39
  34. Nov 05, 2019
  35. Sep 12, 2019
  36. Aug 21, 2019
  37. Aug 19, 2019
    • Gert Pellin's avatar
      [IMP] point_of_sale, pos_restaurant: multi-user sessions · 118190f3
      Gert Pellin authored
      PURPOSE
      =========
      
      When working in restaurants, there are often more than one waiter working on the same floor.
      But Odoo doesn't support that.
      There can only be one person working on one session for the same tables.
      The purpose of this task to allow several people to work on the same session (while synchronizing sessions).
      
      SPECIFICATIONS
      ===============
      
      - MultiUser is active by default.
      - Allow multiple waiters to login on one PoS Config.
      - All waiters login to the same session, the waiter that does the paiment is the responsible for the order (same as now).
      - Synchonize the information across the multiple instances running on same floors.
      
      Syncronisation will take place at switch of table.
      (close tables automaticly if no activity, to force sync)
      
      - Syncro cannot be done if no internet : how do we manage it ? We should inform the user the internet connection has been lost and that synchro cannot be done. What impacts? To check
      
      Useful links
      https://github.com/it-projects-llc/pos-addons
      https://apps.odoo.com/apps/modules/11.0/pos_bus_restaurant/
      
      
      
      Related PR:
      odoo#32789
      
      TASK-ID: 1891130
      
      closes odoo/odoo#33973
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      118190f3
  38. Aug 09, 2019
Loading