Skip to content
Snippets Groups Projects
  1. Jun 07, 2023
    • Alvaro Fuentes's avatar
      [FIX] point_of_sale: fix memory error · 0d220a7b
      Alvaro Fuentes authored
      
      When there are too many (millions) of POS order lines associated to
      opened POS sessions we get too many taxes, most are duplicated. This
      causes a MemorryError.
      
      Example queries from a real DB:
      ```
      > select count(distinct r.account_tax_id) from pos_order_line l join pos_order o on o.id = l.order_id join pos_session s on s.id = o.session_id join account_tax_pos_order_line_rel r on r.pos_order_
       line_id = l.id where s.state != 'closed'
      +-------+
      | count |
      |-------|
      | 24    |
      +-------+
      > select count(r.account_tax_id) from pos_order_line l join pos_order o on o.id = l.order_id join pos_session s on s.id = o.session_id join account_tax_pos_order_line_rel r on r.pos_order_line_id =
        l.id where s.state != 'closed'
      +---------+
      | count   |
      |---------|
      | 2504539 |
      +---------+
      ```
      
      opw-3295467
      
      closes odoo/odoo#124180
      
      X-original-commit: 45d19b265033aa626e110e51d8b1d01408717a3e
      Signed-off-by: default avatarChristophe Simonis (chs) <chs@odoo.com>
      0d220a7b
  2. Jun 30, 2020
    • Martin Trigaux's avatar
      [FIX] *: correct all or improve code translation lookup · 400cc4f1
      Martin Trigaux authored
      
      This commit fixes all issues detected by the new pylint
      gettext-variable test.
      It converts some calls to the new syntax
        _("Foo %s", bar)
      
      to progressively migrate the code to the new syntax.
      
      A few calls were not technically incorrect but still detected by the
      linter.
      
        _("Foo" +
          "Bar")
      
      has been converted to
      
        _("Foo"
          "Bar")
      
      as it has the same effect and make sure the argument is of type
      asteroid.Const instead of BinOp).
      
      closes odoo/odoo#53683
      
      Related: odoo/enterprise#11467
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      400cc4f1
  3. Aug 27, 2019
    • Pierre Masereel's avatar
      [FIX] point_of_sale: apply tax repartition lines on amount · b51ff07c
      Pierre Masereel authored
      
      Since implementation of repartition lines on tax in accounting, the
      amount on the tax is not always the effective amount to apply on price
      of a product. You can have a tax with amount of 20% for example, and two
      repartition lines of 100% and -100%, that will lead to have to apply 0%
      on the tax.
      
      So we are computing the effective amount on the tax by multiplying the
      amount of tax by the sum of repartition lines factor.
      
      closes odoo/odoo#36140
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      b51ff07c
  4. Jul 17, 2019
    • Adrian Torres's avatar
      [REM] *: calls to @api.multi · 4b38cc65
      Adrian Torres authored
      Multi is the default api for methods, it is not necessary to explicitly
      decorate methods with it, adds clutter and most people use it because
      they see that the rest of the code uses it.
      
      Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
      4b38cc65
  5. Jun 19, 2018
    • Nicolas Martinelli's avatar
      [FIX] point_of_sale: modify tax · ec30c1b4
      Nicolas Martinelli authored
      Prevent the modification of a tax which is used in an opened POS
      session. This avoids inconsistency between the payment and the order
      accounting entries.
      
      opw-1859092
      ec30c1b4
Loading