Skip to content
Snippets Groups Projects
  1. May 16, 2018
  2. May 15, 2018
  3. May 14, 2018
    • Christophe Simonis's avatar
      1bcc856e
    • Christophe Simonis's avatar
      [FIX] website: correct GeoIP Legacy compatibility · 04508683
      Christophe Simonis authored
      Attribute is different for country and continent objects.
      04508683
    • Denis Ledoux's avatar
      [FIX] mass_mailing: force to not use a template for the rendering · e48767fe
      Denis Ledoux authored
      If the user configures a default `template_id` for
      the `mail.compose.message`,
      this template was used by the mass mailing to render the email,
      and, among others,
      it therefore used the `email_to` of this email template,
      to render the recipients,
      and it was configured empty or something else than `object.id`,
      it did not used the `active_ids` passed in the context to the
      `mail.compose.message` `create` call to compute the correct
      recipients
      
      To reproduce:
       - In developer mode (?debug)
       - Open the full mail compose message
         e.g. in app sales, open a so, hit new message,
         and hit the button to open the full message composer
       - Set the template to the quotation template is not there already
       - In the debug menu of the dialog, View > Set defaults,
       - Click the radio button to all users, and the default to Use template = ...
       - Then, try to send a mass mailing. It will fail because it cannot
         compute the `email_to` values correctly because the `email_to`
         of the quotation template is empty.
      
      opw-1840287
      e48767fe
    • Nicolas Martinelli's avatar
      [FIX] hr_expense: account on expense · 3579bd53
      Nicolas Martinelli authored
      - Set a specific expense account on an expense product
      - Send an email to the expense alias
      
      The specific expense account is not used; a default account is used
      instead.
      
      opw-1838174
      3579bd53
    • Christophe Simonis's avatar
      7b1362ac
    • Nicolas Lempereur's avatar
      [FIX] web_editor: ignore range error on Restricted · 5bb7ffa2
      Nicolas Lempereur authored
      In firefox, if we have a range on eg.:
      
        `<input type="file">`
      
      and we tabulate to get to it, we have the range over:
      
        `<button type="button" tabindex="0">Browse…</button>`
      
      which seems to be a "virtual" element inside the `<input/>` but this
      magic element is "Restricted" and causes error such as:
      
        `Permission denied to access property "nodeName"`
      
      So this fix ignore errors when getting a range from current selection on
      keyup.
      
      opw-1819279
      closes #24524
      5bb7ffa2
    • Lucas Perais (lpe)'s avatar
      [FIX] point_of_sale: user on invoice same as on order · 3416d4a7
      Lucas Perais (lpe) authored
      Open a pos session with a user A
      Change cashier to user B
      
      Make an order with invoice
      
      Before this commit, the salesman of the order was user B
      but the salesman on the invoice was A
      
      After this commit, both invoice and order have user B as salesman
      
      OPW 1844175
      closes #24642
      3416d4a7
    • Lucas Perais (lpe)'s avatar
      [FIX] point_of_sale: sale details report should display the internal ref of products · 3a09c06f
      Lucas Perais (lpe) authored
      It seems that in v8 the internal reference (the code) of the product
      was displayed in the sales details report of the pos
      
      This commit put that field back on the report
      
      OPW 1844776
      closes #24641
      3a09c06f
  4. May 13, 2018
  5. May 11, 2018
  6. May 09, 2018
  7. May 08, 2018
    • Nicolas Lempereur's avatar
      [FIX] tools: mail transcoding css space consistent · d595e3a2
      Nicolas Lempereur authored
      The transcoding of a mail (transforming CSS into inline styles on the
      element nodes of the mail) used the form:
      
       property:value;
      
      So when a mail is saved, it would be eg. with `style="property:value;"`
      and when it is being edited "property:value" is removed if available via
      CSS stylesheet given the structure.
      
      But the sanitize_style (introduced in bfe7aafa) adds an espace before
      the value (which is more pretty but was probably not choosen in
      transcoding to decrease size of mail):
      
       property: value;
      
      so the inline style would not be removed when editing possibly causing
      conflict with the editor.
      
      With this commit, the sanitize_style doesn't add a space. It could have
      been changed in transcoding but the code is already rather slow and we
      don't want to use a regex replace or two string replace instead of the
      current one string replace.
      
      opw-1841107
      d595e3a2
  8. May 09, 2018
    • Nicolas Lempereur's avatar
      [FIX] web_editor: optimize big mail transcoding · b739e659
      Nicolas Lempereur authored
      The browser may throw an error when a big mail such as one with
      hundreds thousands of tags is being transformed to have a style
      more compatible with mail clients.
      
      The error would be:
       "Uncaught RangeError: Maximum call stack size exceeded"
      
      This happens in jquery because we hare too many nodes (there is an
      ongoing issue at https://github.com./jquery/sizzle/issues/403) so this
      commit replace that part by a DFS traversal over DOM nodes.
      
      There was also an issue that not having the option "style-inline" would
      still cause some style code to be ran albeit it was intended not to be
      solved in 55c7d2d5.
      
      opw-1841107
      closes #24550
      b739e659
  9. May 08, 2018
  10. May 07, 2018
    • Denis Ledoux's avatar
      [FIX] account: avoid cache invalidation at the opening of an invoice · da6b4add
      Denis Ledoux authored
      * Avoid to invalidate the cache if no actual deletion has been
      made when recomputing the taxes
      
      * Avoid to create analytic entries to delete them right away
      few lines further in the same method:
       - Analytic entries are created at line 903
         - account_invoice.py:751 `move_line_dict['analytic_line_ids'] = [(0, 0, line._get_analytic_line())]`
         - account_invoice.py:840 `iml = inv.invoice_line_move_line_get()`
         - account_invoice.py:886 `line = inv.group_lines(iml, line)`
         - account_invoice.py:894 `'line_ids': line,`
         - account_invoice.py:903 `move = account_move.with_context(ctx_nolang).create(move_vals)`
       - Then, at line 907, they are deleted and others are created again:
         - account_invoice.py:907 `move.post()`
         - account_move.py:130 `move.line_ids.create_analytic_lines()`
         - account_move.py:1258 `self.mapped('analytic_line_ids').unlink()`
         - account_move.py:1262 `self.env['account.analytic.line'].create(vals_line)`
        Deleting these analytic entries indeed implies the invalidation of the cache.
        Besides, generally speaking, we should avoid to waste resources
        by creating/unlinking records without a good reason.
      da6b4add
    • Denis Ledoux's avatar
      [FIX] stock: prevent to create the reception route over and over when deleted once · a8ab14a6
      Denis Ledoux authored
      When the reception route of a warehouse company is deleted by the user
      e.g. My company, Chicago Receipt in 1 step is deleted,
      and then changing the given warehouse `Incoming Shipments`
      multiple times
      e.g. from `one_step` to `two_steps` multiple time,
      the reception route is created again and again and again.
      
      This is because the reception route which is created for the
      warehouse is not being assigned to the warehouse
      as the `reception_route_id` once newly created.
      
      opw-1836544
      a8ab14a6
    • Christophe Matthieu's avatar
      [FIX] mail tools: html_sanitize must keep useful styles from mass mailing · b8006bfb
      Christophe Matthieu authored
      Issue: The clean removes too many tags so emails sent do not resemble the
      preview.
      
      opw-1841138
      opw-1841105
      b8006bfb
    • Josse Colpaert's avatar
      [FIX] sale: creating invoice name from SO ref · 468e2e45
      Josse Colpaert authored
      Steps to reproduce the bug:
      
      - Create a SO with 2 lines and confirm it
      - Set a Customer reference on the SO with "This is, a ref"
      - Deliver it
      - Create an invoice from it with all the invoicable lines
      
      Bug: The name of the invoice was: "This is, a ref, This is, a ref"
      
      Expected behavior: The name of the invoice is: "This is, a ref"
      
      opw:1840738
      468e2e45
    • chirag's avatar
      [FIX] l10n_multilang: overwrite existing translations · cf1b1b6e
      chirag authored
      When a record is created in a different language than English, empty
      translations are created using the _set_ids method for translatable fields.
      
      l10n_multilang makes the account translatable, an empty translation is created
      when the CoA data is processed.
      
      After the CoA installation, l10n_multilang transfer the translations of the
      account templates to the related accounts.
      
      No need to create translation terms again, use _set_ids to update the existing
      translations.
      
      This will prevent a cause of translation duplication, forbidden in the future by
      160d6577
      
      opw-1832071
      Closes #24158
      Unverified
      cf1b1b6e
    • Christophe Simonis's avatar
      0aeb92cc
    • xmo-odoo's avatar
      [IMP] warn when using logrotate in multiprocess · 4e5119c6
      xmo-odoo authored
      The built-in log rotation is *very* unreliable in a multiprocess
      context, which can lead to significant data loss (up to hours of log
      missing) right after rotation[0][1].
      
      Technically, according to the cookbook even filehandler does not
      support multiprocess logging[2].
      
      Either way, we should at the very least warn that logrotate is a Bad
      Idea in multi-workers scenario. Ideally we'd just fall back on regular
      file/stream logging but that likely could & would break existing
      deployments, so maybe implement that for master instead?
      
      Alternatively: implement it properly in multi-worker scenario with
      only the "root" process actually logging to whatever output was set
      up, and all workers sending stuff to log to it via a queue or network
      socket or w/e.
      
      [0]
      https://stackoverflow.com/questions/34186774/why-doesnt-timedrotatingfilehandler-work-properly-and-how-to-solve-this-issuer
      [1] https://github.com/odoo/odoo/issues/16566
      [2] https://docs.python.org/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes
      Unverified
      4e5119c6
    • Christophe Simonis's avatar
      a10240c0
  11. May 06, 2018
  12. May 04, 2018
    • Alexandre Kühn's avatar
      [FIX] web: correctly display filename when uploading a file · c3ce7123
      Alexandre Kühn authored
      
      Before this commit, we had the following issue with binary widget in a form:
      
      Suppose we have a binary field with filename attribute set. When uploading a
      new file 'temp.txt' with content 'Cg==', the displayed value is 'Cg=='. When
      the changes are saved, the displayed value becomes 'temp.txt'.
      
      It should always display 'temp.txt', which is what is fixed by this commit.
      
      In addition to fixing this issue, we describe what is the expected displayed
      value of a binary field. This is based on whether the attribute filename is
      provided, and whether the record is in edit or read-only mode.
      
      Fixes #21630
      Closes #24275
      
      Co-authored-by: default avatarNick Booker <nick.booker@opusvl.com>
      c3ce7123
    • Olivier Colson's avatar
      [FIX] account: use company currency in _compute_matched_percentage in case no... · d13ce05c
      Olivier Colson authored
      [FIX] account: use company currency in _compute_matched_percentage in case no currency is set on account.move
      
      When a move or move line is supposed to use the company currency, its currency_id field is empty. _compute_matched_percentage did not take this into account, causing the rounding method to sometimes be called with a precision equal to False, resulting in erronous and weird behavior (0 was considered different from 0, causing a division by zero in the following condition).
      d13ce05c
    • Arnold Moyaux's avatar
      [FIX] stock: prevent to create the reception route over and over when deleted once · aab2ceef
      Arnold Moyaux authored
      When the reception route of a warehouse company is deleted by the user
      e.g. My company, Chicago Receipt in 1 step is deleted,
      and then changing the given warehouse `Incoming Shipments`
      multiple times
      e.g. from `one_step` to `two_steps` multiple time,
      the reception route is created again and again and again.
      
      This is because the reception route which is created for the
      warehouse is not being assigned to the warehouse
      as the `reception_route_id` once newly created.
      
      _update_routes should work the same way than _create_routes,
      it should return new value to write on the warehouse.
      
      based on preliminary by Denis Ledoux
      
      opw-1836544
      aab2ceef
  13. May 03, 2018
    • Christophe Simonis's avatar
      4b7f4f32
    • Olivier Dony's avatar
      [FIX] account: do not block reconciliation on different partners · 78ce64a6
      Olivier Dony authored
      This constraint was added during the Great Accounting Reform of v9, in
      an attempt to help users avoid reconciliation mistakes.
      
      It turns out that such mistakes are difficult to make in normal
      situations, since the system only offers matching entries to reconcile,
      so the constraint is largely redundant.
      
      On the other hand, it does block legit cases of reconciliation,
      such as those where a large number of lines with different partners are
      reconciled together. This often happens when reversing a Journal Entry
      that encompasses multiple customers, such as a POS closing entry, or a
      manual entry.
      
      To make the system more flexible, let's consider that when a manual
      reconciliation breaks the "single partner" rule explicitly, it's for a
      good reason, so we should allow it.
      
      OPW: 1840437
      
      Backport of 8e73023f
      Unverified
      78ce64a6
    • Goffin Simon's avatar
      [FIX] stock: Scheduled date purchase order wrong · 7353405a
      Goffin Simon authored
      When running the scheduler for a reordering rule, the delivery lead time
      of the seller was not taken into account.
      
      opw:1837550
      7353405a
    • Nicolas Lempereur's avatar
      [FIX] web: don't change page before saving · f12daec1
      Nicolas Lempereur authored
      When we edit a list view and change page before the change has been
      savec, the saving and page changing will be done concurrently thus
      possibly causing an error if the page is changed before the saved is
      finished: the save will try to modify the page that is no more
      displayed.
      
      In this change, the list view editable wait for the saving to be
      finished before reloading its content.
      
      note: for 9.0 up to saas-15
      
      opw-1839149
      closes #24471
      f12daec1
  14. May 02, 2018
Loading