Skip to content
Snippets Groups Projects
  1. Jun 26, 2019
    • Nicolas Martinelli's avatar
      [FIX] product: create variants in multi-company · 6387614d
      Nicolas Martinelli authored
      
      - Install stock module
      - Activate multi-company and variants
      - Create a second company
      - Create a product with 2 variants
      - Create a picking with the product for both companies
      - Add an attribute on the product with 2 values
      - Save
      
      An AccessError is raised on `stock.move`.
      
      It arises because the field `product_qty` on `stock.move` must be
      recomputed but is on a record in a different company.
      
      The `try` / `except` clause doesn't protect against the recomputation.
      Indeed, what happens is:
      - try to unlink in batch => AccessError due to recomputation
      - try to unlink individually => AccessError due to recomputation
      - try to write individually => the field couldn't be recomputed before
      (flagged as dirty), so try again to recompute => AccessError
      
      We perform the operation as sudo, and take care of checking the access
      rights beforehand.
      
      opw-2009450
      
      closes odoo/odoo#34369
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      6387614d
  2. Jun 19, 2019
  3. Jun 27, 2019
  4. Jun 26, 2019
  5. Jun 25, 2019
    • Jorge Pinna Puissant's avatar
      [FIX] mrp: BoM structure report with variants · 044c5c2c
      Jorge Pinna Puissant authored
      
      1. Setup a few variants for a product;
      2. Create a BoM for each of the variants with different
      components/quantities, make sure to specify the product variant field;
      3. Go to any of the variants and click Print BoM Structure.
      
      Before this commit, it will print the BoM structure for all variants and
      not only the one selected. Also, it will print in all the variants the
      same BoM structure. If multiples BoM were selected to print, each
      variant of the product was printed with each of the BoM structure
      selected.
      
      Now, if you select one BoM, only this is printed. If multiples BoM are
      printed, each product, and product variant are correctly related to
      their respective BoM structure.
      
      opw-2007939
      
      closes odoo/odoo#34353
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      044c5c2c
    • Goffin Simon's avatar
      [FIX] mrp: Manufacturing cost analysis report · cb4afb26
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Create a finished product P with a manufacturing BOM B
      - Set two components on B C1 and C2
      - Create a MO with P and process it(plan and produce it)
      - Unlock the MO and set the consumed qty of C1 to 0
      - Lock and click on Mark as Done
      - Click on Cost Analysis
      
      Bug:
      
      C1 was displayed in the report with a qty = 1.0
      
      opw:2010912
      
      closes odoo/odoo#34351
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      cb4afb26
    • Christophe Simonis's avatar
      [FIX] hr_timesheet: add missing dependency for `timesheet_uom` widget · e628e662
      Christophe Simonis authored
      
      The `timesheet_uom` widget is a proxy to another widget (configurable
      server-side). We need to ensure the widget registry is filled before
      using it to avoid a fallback to `float_factor` widget.
      
      closes odoo/odoo#34350
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      e628e662
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: measure/groupby many2one variation in pivot view · 89d5cc3b
      Mathieu Duckerts-Antoine authored
      
      In case a many2one field (let us say 'foo') is used
      simultaneously as a groupby and a measure in the pivot view,
      the values returned by a read_group for that many2one are of
      the form [id, label] and the aggregated values (always 1) are
      missing in the read_group results (datapoints).
      Thus typically, a datapoint is of the form
      
      {'foo': [1, 'Bar'], '__count': 4, ...}
      
      and does not contain information on the 'foo:count_distinct'
      value (this is a read_group bug).
      
      As a consequence, a special processing of the read_group
      datapoints is done in the pivot model to handle that
      situation and the value for 'foo:count_distinct' is infered
      correctly to be 1.
      
      In the pivot comparison mode, datapoints comming from the
      period and the comparison period (data and comparisonData
      sets) are identified if they have same values for the groupby
      fields and the measure values become small objects containing
      information on the the measure values for data and for
      comparisonData and on the related variation.
      
      Thus
      
      {foo: [1, 'Bar'], __count: 4, ...}
      
      from data and
      
      {foo: [1, 'Bar'], __count: 3, ...}
      
      from comparisonData should become a single datapoint
      
      {
      foo: [1, 'Bar'],
      __count: {
      data: 4,
      comparisonData: 3,
      variation: {
      magnitude: +33 (%)
      }
      }
      fooAggregate: {
      data: 1,
      comparisonData: 1,
      variation: {
      magnitude: 0 (%)
      }
      }
      
      It turns out that the code responsible for merging the data
      and comparison datapoints made a mistake by mixing the keys
      'foo' and 'fooAggregate', with the consequence that the
      variations were not correctly computed in the situation
      described above.
      
      This is fixed in this commit.
      
      closes odoo/odoo#33118
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      89d5cc3b
    • Nicolas Martinelli's avatar
      [FIX] website_sale_stock: custom message translatable · 28e24b95
      Nicolas Martinelli authored
      
      Make the 'Custom Message' field translatable since it is supposed to be
      used on the website and displayed in the language of the user.
      
      opw-2008088
      
      closes odoo/odoo#34344
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      28e24b95
  6. Jun 24, 2019
    • Alexandre Kühn's avatar
      [FIX] mail: keep chat window hidden on receiving new message · ea1960d1
      Alexandre Kühn authored
      
      Before this commit, when receiving a new message from a hidden chat
      window, it was making it visible. Because of this, if we had focus
      on any other window, the focus was lost. Even more annoying, if we
      had focus on the left-most visible chat window, it moved to hidden
      menu, so that new chat window takes its place.
      
      This commit fixes the issue by keeping new chat windows hidden
      on receiving new messages, in case there is not enough available
      space.
      
      Task-ID 2026101
      
      closes odoo/odoo#34291
      
      Signed-off-by: default avatarMartin Geubelle (mge) <mge@openerp.com>
      ea1960d1
  7. Jun 21, 2019
    • Nicolas Martinelli's avatar
      [FIX] account: incorrect bank account domain · 1db37172
      Nicolas Martinelli authored
      
      - Set 2 banks accounts for a partner A
      - Create a credit note
      - Choose partner A => a default bank account is chosen, and both are
      available in the list.
      - Save, go back to the tree view, then reopen the same credit note
      
      It is not possible to choose among both bank accounts anymore.
      
      It is due to the domain set on the view, which is valid for customer
      invoices but not for credit notes. It works at creation since
      `_onchange_partner_id` overrides the domain for `out_refund`.
      
      In this specific case, a domain in the view is not appropriate: the same
      view is used for 2 invoice types although they require a different
      domain. Therefore we set the domain only in the onchange. The drawback
      is that all bank accounts are shown when we reopen a customer invoice or
      a credit note from the tree view since the onchange is not triggered.
      However, the constraint `validate_partner_bank_id` still protects
      against an incorrect configuration.
      
      opw-2010017
      
      closes odoo/odoo#34292
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      1db37172
  8. Jun 18, 2019
    • jev-odoo's avatar
      [FIX]web_tour:avoid unnecessary traceback · 5bb9a8b4
      jev-odoo authored
      
      In certain case, a non blocking traceback pops-up.
      It happens when the page loads, if the dom is modified
      before the tour has been fully loaded.
      
      Theorical steps to reproduce:
      - Open a page with an active tour
      - Trigger any domain change before the tip-dot is loaded
      
      On every change in the DOM, the MutationObserver tries
      to update the page. If the tip-dot has not been loaded yet,
      it will try to update the position of a non-existing element.
      In that case, we simply ignore it. The update will be called
      anyway when the tip-dot has finished his loading.
      
      opws:
      1923348
      1965964
      2011027
      2008708
      2001867
      2000228
      1998906
      1972914
      1972629
      1963173
      1961373
      1956962
      1949591
      1947390
      1947286
      1944577
      1944459
      1941764
      1938887
      1936518
      1935831
      1934788
      1934471
      1934225
      2006977
      1970672
      1931721
      1931593
      
      closes odoo/odoo#34199
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      5bb9a8b4
  9. Jun 19, 2019
    • Nicolas Martinelli's avatar
      [FIX] payment_stripe: save token · 25745d85
      Nicolas Martinelli authored
      
      - Configure Stripe with 'Save Cards' set to 'Let the customer decide' or
      'Always'.
      - Go to the eCommerce, buy an item
      - Use Stripe to pay, make sure to check 'Save my payment data'
      
      No payment token is saved.
      
      It occurs because 2 calls are performed to `/shop/payment/transaction`.
      The second call, which is used to record the transaction, doesn't
      contain the `save_token` parameter is not sent.
      
      Ideally, we should only make a single call, but since Stripe works a bit
      differently, we can't prevent it (in stable, at least). Therefore, we
      work around it by searching the checkbox value.
      
      opw-2008275
      
      closes odoo/odoo#34242
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      25745d85
  10. Jun 24, 2019
  11. Jun 20, 2019
    • Adrian Torres's avatar
      [FIX] base: do not generate auto xmlid for custom fields · 547118d7
      Adrian Torres authored
      
      For custom fields, the _module attribute is False, this means that
      during the reflection of the model, the custom field's xmlid would be
      set up as being introduced in the module of its model's original
      definition, which is wrong (because it has no module).
      
      E.g. field x_foo introduced in my_mod by extending model bom from
      mrp, the resulting xmlid would be `field_mrp_bom__x_foo` when in reality
      it should be `field_my_mod_bom__x_foo`, however this patch simply
      disables the feature for custom fields as there is little to no use for
      them to have an automatic xmlid.
      
      Task-ID: 2025151
      
      closes odoo/odoo#34265
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      547118d7
  12. Jun 13, 2019
  13. Jun 20, 2019
    • Nicolas Martinelli's avatar
      [FIX] account: fiscal year end dates in wizard · 988018a5
      Nicolas Martinelli authored
      
      - From Accounting dashboard > Configuration panel > Configure fiscal year
      - Set opening date: 01/07/2018
      - Set fiscal year end: June 30
      - Click Apply button
      
      An error is raised: 'Invalid fiscal year last day'.
      
      This is because the 3 fields are linked by the constraint
      `_check_fiscalyear_last_day`. However, non-stored writeable related
      fields are evaluated one at a time, meaning that the constraint is
      evaluated one value at a time.
      
      We do a fancy workaround to write the 3 values at once on the company,
      hence evaluating the constraint for the 3 fields once.
      
      opw-2024927
      
      closes odoo/odoo#34275
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      988018a5
  14. Jun 23, 2019
  15. Jun 19, 2019
    • Julien Castiaux's avatar
      [FIX] calendar: shift midnight to current locale · 81147140
      Julien Castiaux authored
      
      Configure your system to be in the Mexico timezone, configure your Odoo
      profile accordingly. Go to calendar, show daily events, add an event at
      the end of the day (like 10pm). The resulting event is not visible on
      the daily view although it is on the weekly view. The same problem
      occurs on the weekly view if the event was create late the last day.
      
      The problem is the initial `search_read` has a domain to filter the
      events using 00:00 UTC to 23:59 UTC boundaries. Those boundaries are not locale
      aware, they should be shifted to the MX timezone.
      
      opw-2009877
      
      closes odoo/odoo#34247
      
      Signed-off-by: default avatarJulien Castiaux <Julien00859@users.noreply.github.com>
      81147140
  16. Jun 21, 2019
  17. Jun 20, 2019
  18. Jun 19, 2019
    • Xavier Morel's avatar
      [FIX] core: work around ir_logging deadlock · c5c955db
      Xavier Morel authored
      
      DROP CONSTRAINT (even with IF EXISTS is specified) acquires an ACCESS
      EXCLUSIVE lock on the table, preventing e.g. inserts in an other
      transaction, so ir_logging would systematically deadlock if configured
      to the same database and a warning would be triggered during install
      or update (if that ran ir.logging's init).
      
      1. hand-roll the "IF EXISTS" bit, to avoid taking an ACCESS EXCLUSIVE
      lock on the table if the problematic constraint does not exist and
      thus doesn't need to be dropped (which by now should be the vast
      majority of cases).
      
      Replacing DROP CONSTRAINT with DISABLE TRIGGER does not fix the
      issue as *that* acquires SHARE ROW EXCLUSIVE. While that's less
      constraitning than ACCESS EXCLUSIVE, it still conflicts with an
      insert's ROW_EXCLUSIVE.
      
      2. add a timeout to the logging INSERT anyway, the deadlock is still
      an issue if we're updating a database which does have the
      problematic constraint, and we want to preclude the possible
      eventual introduction of new deadlocks in the future.
      
      closes odoo/odoo#34243
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      c5c955db
    • Басхүү's avatar
      [CLA] Add CLA for Baskhuu · f7f58b10
      Басхүү authored
      f7f58b10
  19. Jun 20, 2019
  20. Jun 19, 2019
Loading