Skip to content
Snippets Groups Projects
  1. Sep 23, 2019
  2. Sep 21, 2019
  3. Sep 20, 2019
    • Florimond Husquinet (fhu)'s avatar
      [FIX] survey: answers not saved when using breadcrums · 45c6341b
      Florimond Husquinet (fhu) authored
      
      - Create a survey with one page per section.
      - Go to the second section and select an answer.
      - Go back to the first section using the breadcrums.
      
      Before this commit:
      
      if you go back again to the second section, you will see that your answer
      wasn't saved.
      
      After this commit:
      
      answers are saved even when navigating with breadcrums.
      
      closes odoo/odoo#37157
      
      Opw: 2072948
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      45c6341b
    • Antoine Vandevenne (anv)'s avatar
      [IMP] doc: rewrite of the source install page · 06915120
      Antoine Vandevenne (anv) authored
      
      Prior to this commit, the documentation page for the installation of Odoo had lots of inconsistencies, errouneous information and a bad structure.
      
      This commit restructures the page to split the Source Install chapter into three sections for Windows, Linux and Mac OS.
      Each section is entirely rewritten to be accurate, logical, clean, easy to understand and focused on its purpose (removed tutorials of non-Odoo softwares).
      
      task-2072822
      
      closes odoo/odoo#37001
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      06915120
    • William's avatar
      [FIX] stock: remove move 'without package' properly · 3431d7b1
      William authored
      
      on a picking, move_ids_without_package is a subset of move_lines.
      The inverse function on move_ids_without_package only work well when we
      add a move.
      
      This commit improves the inverse function to take deletion into account
      
      closes odoo/odoo#36558
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      3431d7b1
    • Damien Bouvy's avatar
      [FIX] payment_stripe_sca: on-the-fly customer conversion · 7807bc85
      Damien Bouvy authored
      
      Payment tokens created before the installation of this module and that
      used the Charge API did not need to keep the card reference on Odoo's
      side - since we were allowed by the API to simply specify a customer
      reference when creating a charge and it would take the default one for
      that customer. Odoo creates one customer per payment token (even if it's
      the same partner), so there was no uncertainty there.
      
      Now, with the PaymentIntent API, the payment method reference is
      mandatory. We have a field to keep it in db, but this info needs to be
      retrieved for tokens created before the module's installation. This fix
      introduces that remote call.
      
      closes odoo/odoo#37206
      
      X-original-commit: 1b760a98
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      7807bc85
    • William Henrotin's avatar
      [IMP] mrp: compute quantities speedup · 1067f3bd
      William Henrotin authored
      
      The computation of kit quantities was not efficient. A loop on each product
      of the recordset to consider performed. Each time a product was seen as 'not a kit',
      a new computation on the complete recordset was done. This leads to a N^2 complexity
      
      This commit only compute stock quantities for non kit product in one batch
      
      opw-2070768
      
      closes odoo/odoo#37205
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      1067f3bd
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: broken filter in reconciliation widget · 5e2ae036
      Andrea Grazioso (agr-odoo) authored
      
      From Accounting app under the kanban card "Bank" click on
      "Reconcilile items". Select a line to reconcile with a selected partner
      or counterpart (or input one) and then filter the underlying lines using
      for example the name of the record
      
      No filtering will occur, this is due to commit 900d89c9.
      The domain used by the filtering function is matching all lines
      from the current partner instead of restricting the search to
      the filtered elements.
      
      Reverting that commit and providing a fix for the original issue:
      removing a check on the partner id make a logical separation between the
      domain involving the partner_id and the one related to the search string,
      so that they do not interfere with each other (at most they will overlap).
      
      Preserving tests from the reverted commit and adding some more as well
      
      opw-2070458
      
      closes odoo/odoo#37179
      
      X-original-commit: d434251f
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      5e2ae036
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] web: digits option not applied in list view · 3ee3f7d4
      Andrea Grazioso (agr-odoo) authored
      From the settings activate:
      
      - Multiple Sales Prices per Product
      -- Prices computed from formulas
      - Discounts
      
      Create a pricelist with discount policy "Show public price & discount to
      the customer", set the price calculation formula:
      - Rounding: 10
      - Price discount: 10%
      
      Modify the sale order xml list view adding 'digits="[3, 2]"' to the
      discount shown in the sale order line.
      
      Create a sale order with such pricelist and on the so line put a
      product with quantity 1 and sale price 4190 (VAT 19% included in the price).
      
      The discount will not display the requested number of decimal digits (2)
      in list view, but it will when editing the field.
      
      The cell formatting is done calling the appropriate function (formatFloat),
      which search the digits option from the 'options' parameter or from the field
      definition. The latter stores the default digits coming from
      the DecimalAccuracy settings, which, as side effect, alter the behavior
      of the discount calculation.
      https://www.odoo.com/web#view_type=form&model=project.task&id=2069939&active_id=2069939
      
      When passing into edit mode the field is created as widget, parsing its options
      which have 'digits', instead when coming back in list mode it is "just a
      float field" rendered directly from the list_renderer which no options,
      so the formatFloat will look at the field definition
      https://github.com/odoo/odoo/blob/12.0/addons/web/static/src/js/fields/field_utils.js#L172
      
      
      
      Adding the correct parameter to the dictionary passed to formatFloat
      during the list rendering is a possible solution, because it is the
      "closest" point in which parsing the parameter is possible without
      touching higher level code or forcing the creation of a widget (adding
      widget='float' as xml parameter).
      
      closes odoo/odoo#37167
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      3ee3f7d4
  4. Sep 19, 2019
    • Nans Lefebvre's avatar
      [FIX] service: clear environments between transaction retries · 151666b7
      Nans Lefebvre authored
      
      Initial bug report, full of red herrings:
      receive two support requests by email while on Odoo.sh, the first creates a
      ticket, while the second replies to the server with the error:
      550 Requested action not taken: mailbox unavailable
      
      When a request is done, the service check function tries each request multiple
      times when getting Operational errors.
      When two email are received within a 'short' amount of time (e.g .1 second)
      the two requests are initiated with a new cursor.
      When both mails generate the creation of a new record of the same model,
      the second cursor is going to fail because of an:
      ERROR: could not serialize access due to concurrent update
      However, the record we used in the computations needed in the creation of the
      second record have been added to the environment.
      When that second creation is retried, it will operate on the same records,
      and find them in the todo, with the environment that was obtained for the first
      trial. Since the cursor is closed, this crashes.
      
      To explain the bug report, Odoo.sh transfers the mail through an xmlrpc
      to process the mail.
      Because of this crash, the server interprets the lack of well-formed response
      by a generic 'mailbox unavailable'.
      
      opw 2060476
      
      closes odoo/odoo#37165
      
      X-original-commit: 845eecdf
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      151666b7
    • Nicolas Martinelli's avatar
      [IMP] account: better logging of unbalanced entry · f00d6aae
      Nicolas Martinelli authored
      
      Display the difference when an unbalanced journal entry is created to
      help pointing out the source of the issue.
      
      opw-2069673
      
      closes odoo/odoo#37145
      
      X-original-commit: d00e3158
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      Co-authored-by: default avatarjev-odoo <jev@odoo.com>
      f00d6aae
    • Hugo Adan's avatar
      [FIX] web: incompatible blockquote css · 7592d609
      Hugo Adan authored
      - Add the following in a PDF report:
      ```html
      <p>
          <blockquote>
              <ol class="loweralpha simple">
                  <li>Item that explain terms</li>
                  <li>Another item that explain something else</li>
              </ol>
          </blockquote>
      </p>
      ```
      - Print the report
      
      Wkhtmltopdf crashes with the error:
      
      Wkhtmltopdf failed (error code: -11). Memory limit too low or maximum
      file number of subprocess reached. Message : b''.
      
      This is a known issue:
      https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4115
      
      
      
      Actually, since this CSS is only used for Wkhtmltopdf reports, we can
      simply remove the CSS rule causing the problem.
      
      Closes #37034
      Fixes #37033
      
      opw-2073195
      
      closes odoo/odoo#37155
      
      X-original-commit: 8d088931
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      7592d609
    • Nans Lefebvre's avatar
      [FIX] product: always use UTC to compare pricelist dates · c92fb90e
      Nans Lefebvre authored
      
      In case where no argument is given to _compute_price_rule, it would default to
      context_today().
      This gives "today" in function of the context, depending on the user timezone.
      In contrast, an explicitly given date would always be UTC.
      Furthermore, on the webshop an unlogged user would get the Public User timezone,
      and once logged would get its portal user's timezone.
      
      To make everything coherent, we always use UTC.
      
      opw 2054881
      
      closes odoo/odoo#37154
      
      X-original-commit: 35d4a8cc
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      c92fb90e
    • Nans Lefebvre's avatar
      [FIX] sale: get correct account to create corresponding invoice · eb2885bc
      Nans Lefebvre authored
      
      Sibling commit of 427280d9, same use case.
      
      Be in company C1. Create the invoice I for a SO in company C2.
      The invoice line is with an account created of C1.
      This is because property_account_income_id or property_account_income_categ_id
      are company dependent properties that need to be accessed with a force_company.
      This happens when e.g. C2 is a child company of C1.
      However, accounts are not readable across companies, so the resulting invoice
      cannot be validated in either company, since there is a mix of accounts.
      
      Note that in case force_company is False, it defaults to the user's company,
      which is already the default.
      
      opw 2068291
      
      forwardport of 79714bafe4b
      
      closes odoo/odoo#37146
      
      X-original-commit: ae84e7fd
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      eb2885bc
    • Nans Lefebvre's avatar
      [FIX] base: fix portal rights update · 7571b086
      Nans Lefebvre authored
      
      Commit c3717f30 added a (5, 0, 0) command when modifying groups_id of any
      non-internal user, to avoid the situation where the various implications would
      end up giving the portal user group_user rights.
      This risk is avoided by commit f206714a, which added a constraint
      check_one_user_type, which would raise in that specific case.
      The last missing piece was 9badedcd; when groups are added through settings,
      they are added through the implied_groups of the group model.
      
      The (5,) command has the unfortunate side-effect to remove the portal group
      from a user if a write is triggered programmatically.
      If that happens, then the 'signing up' process end-destination is a 500 error.
      
      Now we simplify the logic that keeping the same behaviour for implied_ids for
      internal (group_user) and non-internal users.
      We keep the (5,) command in one case: if a user is demoted to portal or public,
      he may have groups should be reserved to internal users, but that do not imply
      group_user (which would raise).
      To avoid that, we remove all its groups, since there is no clear distinction
      between technical display groups and actual privilege-granting groups.
      
      opw 2041606
      
      closes odoo/odoo#37144
      
      X-original-commit: 29723e35
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      7571b086
    • Goffin Simon's avatar
      [FIX] product: Field display_name in product template form view · ce709000
      Goffin Simon authored
      
      Steps to reproduce the bug:
      - Go to Sales app and open the form view of a product P
      - With studio add the field display_name in the view
      - Try to create a new product
      
      Bug:
      
      A access error was raised because a read was made on a record in cache
      
      opw:2070074
      
      closes odoo/odoo#37133
      
      X-original-commit: 90143c18
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      ce709000
  5. Sep 18, 2019
  6. Sep 19, 2019
    • jev-odoo's avatar
      [FIX] point_of_sale: use currency precision to test if orders are paid · 5dc389db
      jev-odoo authored
      
      The test was made with an epsilon of 0.00001, which is precise enough to avoid
      false positives, but allowing false negatives.
      As a results, some orders can be incorrectly determined unpaid.
      No (non-digital) currency has a precision higher than 0.00001,
      but many currencies have a precision much lower (e.g the unit for ¥).
      Also, we prepare for the future where all orders will be paid in Bitcoin.
      
      opw 2059997
      
      closes odoo/odoo#37112
      
      X-original-commit: 73c2d46f
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      5dc389db
    • Sebastien LANGE's avatar
      [FIX] stock: slow downs in stock move line creation · ebda1101
      Sebastien LANGE authored
      
      — Create a new product, it's tracking must be set to 'By Unique Serial
          Number';
      — Create a new purchase order, with 500 lines. Each line with 10 units
          of quantity of the previously created product;
      — Confirm the purchase.
      
      Before this commit, the creation of the stock piking take a quite some
      time, and becomes difficult to use this functionality.
      
      Now, the creation of the stock piking time was significantly improved.
      
      opw-2070738
      
      closes odoo/odoo#37107
      
      X-original-commit: a434b087
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      ebda1101
    • Jorge Pinna Puissant's avatar
      [FIX] web: write date without separator · f629cd96
      Jorge Pinna Puissant authored
      
      Since fbbfa6dd it's not longer possible
      to write a date without separator (e.g., 0102 for 01/02/2019; 121298 for
      12/12/1998;  02042018 for 02/04/2018), or a date without year (e.g.,
      01/02 for 01/02/2019) in the datepicker widget.
      
      In this commit we have decided to be as permissive as tempus dominus
      that call moment.js with strict false. This allows moment.js to deduct a
      date from a string in a more versatile way. This also allows a more
      versatile autocomplete in the search views.
      
      opw-2070464
      opw-2070931
      
      closes odoo/odoo#37095
      
      Forward-port-of: odoo/odoo#36821
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      f629cd96
    • Lucas Perais (lpe)'s avatar
      [FIX] account: cash basis base account not required · d786d7d2
      Lucas Perais (lpe) authored
      
      Before this commit, the field cash_basis_base_account_id, used
      to keep track of the base on which a tax a computed for cash basis entries
      was required in the tax form view
      
      Since this account can be absent, and will be most of the time, and that
      an account is retrieved anyway in the move creation process it is safe
      to remove the required attribute in the view
      
      After this commit, the field is not required in view anymore
      
      OPW 2072750
      
      closes odoo/odoo#37060
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      d786d7d2
  7. Sep 18, 2019
Loading