Skip to content
Snippets Groups Projects
  1. Jan 16, 2020
  2. Jan 15, 2020
  3. Jan 16, 2020
  4. Jan 15, 2020
    • fja-odoo's avatar
      [FIX] web_editor: save all child text nodes of oe_structure elements · 47441a92
      fja-odoo authored
      
      When saving the content of an oe_structure, the starting text nodes
      were lost because only the internal *elements* were considered. Ending
      text nodes were kept since they are considered as the last element's
      tail by the etree library.
      
      task-2040764
      
      closes odoo/odoo#43375
      
      X-original-commit: eb71d25c
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      47441a92
    • Goffin Simon's avatar
      [FIX] point_of_sale: Print invoice in POS · d5953378
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider two sales taxes T1, T2
      - Create Fiscal Position FP which maps T1 to T2
      - Create Product P (Customer Tax: T1)
      - Configure FP as default fiscal position and Invoicing to print invoice in POS.
      - Create POS order with any customer, with P and FP
      - Select Print Invoice in the payment window
      - Process the payment
      - Order Preview displays T2 as expected
      
      Bug:
      
      The printed invoice displayed T1 instead of T2 on the invoice line
      
      opw:2171599
      
      closes odoo/odoo#43356
      
      X-original-commit: b26a8d1b
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      d5953378
    • Goffin Simon's avatar
      [FIX] website_sale: Creating an account on the eCommerce · ffde4c8f
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Go to Settings > General Settings
      - Set "Customer Account" on "Free sign up"
      - Go to Website > configuration
      - Activate "Digital Content"
      - Create a fiscal position FP with a coutry group CG and applied automatically
      - Create a service product P with digital content DC at sales price = 0
      - Publish P on the website
      _ Log out and go to the shop with public user
      - Add P in your cart
      - Process the your Order in the shop
      - When the order is confirmed, click on "Downloads"
      - You will be redirected to the login page
      - Click on "Don't have an account?"
      - Fill in the form and sign up
      
      Bug:
      
      Nothing happened because in function sale_get_order in model 'website'
      the partner on the confirmed SO was not the same as the new one and so
      update_pricelist was set to True and a call to function _cart_update was
      done on a confirmed SO. Inspired from function _cart_update in model
      'sale.order'.
      
      opw:2146902
      
      closes odoo/odoo#43362
      
      X-original-commit: 1f6a4e56
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      ffde4c8f
    • Luc De Meyer's avatar
      [FIX] account: don't overwrite statement_line_id when reconciling transfer account · f08204c6
      Luc De Meyer authored
      
      Description of the issue:
      
      Transfer between Bank1 (550001) and Bank 2 (550002) of the same company via the intercompany bank account (580000) :
      
      Bank 1: minus 1000 EUR, we create the following accounting entry via the reconcile widget
      
      account 550001 credit 1000
      account 580000 debit 1000
      
      Bank 2 : Plus 1000 EUR
      
      When we select the counterparty 580000 entry of the Bank 1 statement via the reconcile widget
      than the statement_line_id of the entry from Bank 1 statement is replaced by the one of the Bank 2 statement.
      Hence this account.move.line is linked to the wrong statement line.
      
      closes odoo/odoo#43371
      
      X-original-commit: 3d74e739
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      f08204c6
    • Nicolas Lempereur's avatar
      [FIX] *: avoid muting res.users().context_get return · b2392011
      Nicolas Lempereur authored
      
      Some code modify return of res.users().context_get, but this is a
      cached method so this will unexpectedly affects totally unrelated code.
      
      For example, changing the company with the company switcher could add
      `allowed_company_ids` inside the cache, then it will be cached until the
      server is restarted, even if we change company again inbetween.
      
      Added test failed with:
      
      "NotImplementedError: '__setitem__' not supported on frozendict"
      
      on the line with `User = User.with_context(context)` where User already
      contained `allowed_company_ids` in its context.
      
      note:
      
      in this forward-port, context_get is also changed to return frozendict
      and prevent being able to have an unexpected issue by code that modify
      context_get returns.
      
      opw-2158340
      closes #42465
      
      closes odoo/odoo#42723
      
      X-original-commit: 5d69885c1cd6921b3de00aae7e0ed6fff243ff95
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      b2392011
    • fw-bot's avatar
      [MERGE] project, hr_expense: Fix several multi-company issues + tests · fccaa703
      fw-bot authored
      Purpose
      Fix multi-company access issues following the big changes that happened
      (the 13.0). Make the usability better in order to avoid potential
      multi-company issues for the user.
      
      Specification
      Check the related commits to see the different fixes that have been
      made. For more information about the technical/functional considerations,
      check the related task.
      
      Taskid: 2088891
      X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
      fccaa703
    • yhu-odoo's avatar
      [REF] stock_account: valuation layer and not admin user · 4a1dfb50
      yhu-odoo authored
      
      missing bit from rev[0], [1], and [2]
      
      [0] 7ef11e3c
      [1] d6c8c34e
      [2] 5096e724
      
      closes odoo/odoo#43186
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      4a1dfb50
    • yhu-odoo's avatar
      [FIX]stock_account: stock manager group not inherit account bill group · c87275a6
      yhu-odoo authored
      The inheritance of account billing group gives stock managers the access
      to account module.
      This commit is to remove this inheritance. When we need to access
      account.move model, check if the user is a stock manager. If so, use
      sudo() to get the access.
      
      PR #43186
      Task 2062611
      c87275a6
    • Benjamin Vray's avatar
      [IMP] website: show internal drag&drop zones of dropped snippets · 76afbf93
      Benjamin Vray authored
      
      - Apply the style of drag&drop zones (.oe_structure.oe_empty) even when
        it is a descendant of the editable element, not the editable element
        itself. This change allows to add a visible drag&drop zone in any
        snippet.
      
      - Add the editor messages (data-editor-message) on drag&drop zones when
        a snippet is dropped (not only on editor start as before).
      
      In preparation of task-2152185
      
      closes odoo/odoo#43358
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      76afbf93
    • oco-odoo's avatar
      [FIX] l10n_ch: don't assume the bank account of the company always has a currency_id · aea045d4
      oco-odoo authored
      
      Since this field is not required on res.partner.bank (which is fine: we want it to be synchronized with the journal's currency, which is None if the journal uses company currency), the parameter received by validate_swiss_code_arguments ended out being an empty recordset in case the company was directly in CHF. This caused the QR code to never be displayed in this situation.
      
      closes odoo/odoo#43351
      
      X-original-commit: 60a55834
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      aea045d4
    • fja-odoo's avatar
      [FIX] website_sale: allow updates after product custom text edition · 1aaf095a
      fja-odoo authored
      
      Custom text on product pages was part of the main template thus
      preventing who modifies it to receive updates on the view.
      
      task-2040764
      
      closes odoo/odoo#37288
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      1aaf095a
    • Nicolas Martinelli's avatar
      [FIX] website_sale_delivery: correct price tag · d8d86b34
      Nicolas Martinelli authored
      
      Complement of 6a6a7e6e
      
      Display the price tag correctly on the eCommerce.
      
      opw-2159838
      
      closes odoo/odoo#43352
      
      X-original-commit: 463d79a0
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      d8d86b34
  5. Jan 14, 2020
    • Nicolas Lempereur's avatar
      [FIX] mass_mailing: can unsubscribe in multidomain · 1dc33013
      Nicolas Lempereur authored
      The `unsubscribe` feature of mass mailings repose on having a link with
      HREF attribute `/unsubscribe_from_list` inside the mail message.
      
      When the mass mailing is sent:
      
      - relative URL are replaced by absolute URL (`/unsubscribe_from_list` is
        replaced by `{system parameter web.base.url}/unsubscribe_from_list`)
      
      - `{system parameter web.base.url}/unsubscribe_from_list` is replaced by
        the real mass mailing link containing info that will be used to
        unsubscribe the user.
      
      But there was an issue in the case of multiple domain, if this scenario
      happened:
      
      - system parameter web.base.url is http://domain1
      - a user use "Test" button on a mass mailing
      - system parameter web.base.url becomes http://domain2
      
      
      - the mass mailing is sent
      
      The unsubscribe link is broken, this is because the implementation of
      "Test Mailing" feature would update the mass mailing with absolute
      links, so if the domain change, we the `unsubscribe` link will no longer
      be found and replaced into the source.
      
      opw-2124890
      closes #42373
      
      closes odoo/odoo#43308
      
      X-original-commit: c5036bcb
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      1dc33013
    • Adrian Torres's avatar
      [FIX] tests: make --test-file great again · ee29cb91
      Adrian Torres authored
      
      Sort of but not really, this commit fixes a special case in which
      launching a --test-file of a file with at least two SavepointCases would
      create a postgresql deadlock and it would be impossible to terminate the
      Odoo process without sending a SIGKILL or waiting for the lock to
      timeout.
      
      This was introduced at #39368 and happens because of the way that
      unittests unwraps suites, to keep it short, when it unwraps the custom
      OdooSuite class internally, it ends up with a vanilla TestSuite with
      which to run the different test cases, and since #39368 depends on the
      overrides added to OdooSuite to function, the class cleanups are not
      triggered at the end of a test class (rollback, cache cleanups, env
      reset, registry reset, etc.).
      
      The fix is to manually unwrap the suite of tests to keep OdooSuite as
      the suite with which to call the tests, which was already done for
      --test-enable (although for different reasons, --test-tags?) which is
      why --test-enable didn't have any problems.
      
      This commit also fixes a typo I found on the backport, which meant
      classCleanups were not being executed if the setUpClass failed, but it
      had no effect on classCleanups during tearDownClass.
      
      Task-ID 2160398
      Depends on #43135
      
      closes odoo/odoo#43296
      
      X-original-commit: 7a5ded7d40afc29043d356b5dece0dbe1fbd5ab3
      Signed-off-by: default avatarAdrian Torres (adt) <adt@odoo.com>
      ee29cb91
    • Xavier Morel's avatar
      [FIX] core: chrome doesn't abide by --http-port anymore · 80896a0b
      Xavier Morel authored
      
      An http-port provided on the command line (may also have been an issue
      for config files, didn't check) would not be taken in account anymore,
      because `odoo.tests.common` would be imported during the import of
      `odoo` itself (when loading odoo.service.server), itself importing
      `odoo.tools.config` leading to a default configuration being set up.
      
      * remove `odoo.tests.common.PORT`, `config['http_port']` should be
        used always
      * defer the import of odoo.tests.common by moving it inside
        load_test_file
      * stop generating default configs
      
      closes odoo/odoo#43283
      
      X-original-commit: 45871f498ea4cf3ada719692e69cd413883ab442
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      80896a0b
    • Victor Feyens's avatar
      [IMP] product: product_variant_count shouldn't be editable. · 2e2e877a
      Victor Feyens authored
      
      closes odoo/odoo#43305
      
      Related: odoo/enterprise#7718
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      2e2e877a
    • Victor Feyens's avatar
      [FIX] mail: env.company_id has been replaced by env.company · 26779271
      Victor Feyens authored
      
      closes odoo/odoo#43307
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      26779271
    • Katherine Zaoral's avatar
      [FIX] l10n_ar: Fix responsibility of Foreign partner · cb97a92e
      Katherine Zaoral authored
      
      The Foreign partner used in demo data was wrognly configure, it was set as "IVA Responsable Inscripto" when actually should be "Cliente / Provedor del Exterior".
      
      After fix this in demo we updated the demo data of the vendor bills of this partner to match with the new responsibility.
      
      Also apply and imporve in the way we are setting the fiscal position in the demo invoices, now qw use the onchange instead of setting the fiscal position explicitly in the demo invoices (and removed commented demo data that is not used)
      
      closes odoo/odoo#43301
      
      X-original-commit: 23e28247
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      cb97a92e
    • Lucas Lefèvre's avatar
      [IMP] project: Following a private project no longer required · 7059b177
      Lucas Lefèvre authored
      
      =======
      Purpose
      =======
      
      Currently for a user to be allowed to see a private project they must follow the
      project. This means that they will be added as a follower of all new tasks in the
      project which causes them to receive 1000000 notifications, especially if there are a
      lot of tasks in a project.
      
      ==============
      Specifications
      ==============
      
      1) Add an Employee m2m field on project next to 'Invited Employees'
          - only visible if the 'Invited Employees' option is selected
          - the project should only be visible to employees selected there (regardless if they
            are followers or not)
      2) Add an Employee m2m field on tasks below the 'Email cc' one in debug mode
          - only visible if the 'Invited Employees' option is selected on the related project
          - should be pre-filled with what is set on the project
          - the task should be visible to employees selected there (regardless if they are
            followers or not)
      3) Add a Portal users m2m field on project next to 'Portal users and all employees'
          - only visible if the 'Portal users and all employees' option is selected
          - the project should only be visible to portal users selected there (regardless if
            they are followers or not)
          - rename the option into 'Invited portal users and all employees'
      4) Add a Portal users m2m field on tasks below the 'Email cc' one in debug mode
          - only visible if the 'Portal users and all employees' option is selected
          - should be pre-filled with what is set on the project
          - the task should be visible to portal users selected there (regardless if they are
            followers or not)
      5) Following a project/task should not grant the user/employee the ability to see the
         project/task
      
      Task 2031527
      
      closes odoo/odoo#40505
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      7059b177
    • Nicolas Martinelli's avatar
      [FIX] stock_landed_costs: prevent crash · 1227e407
      Nicolas Martinelli authored
      
      Prevent crash if `stock_valuation_layer_ids` is an empty recordset. Note
      that the original issue is solved with #43017, but requires an upgrade
      of the module.
      
      opw-2172049
      
      closes odoo/odoo#43289
      
      X-original-commit: 8a1ce12a
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      1227e407
  6. Jan 13, 2020
    • Nicolas Lempereur's avatar
      [FIX] web: widget noreset if rerendered for modifier · b048a6fc
      Nicolas Lempereur authored
      
      If we have a many2many_tags widget that is writable then becomes
      readonly, we can have in the code this chain of event:
      
      - get list of widgets we need to reset some data for
      - apply modifiers
      - reset the widgets
      
      but applying modifiers can delete a widget (eg. an editable field that
      becomes readonly), so when resetting we could call code on a deleted
      widget which caused an error.
      
      For example, if we have an attribute:
      
       `<field widget="many2many_tags" attrs="{'readonly': 'condition'}"/>`
      
      if the field goes from editable to readonly and is affected by an
      onchange, we will call `setIDForLabel` on the deleted instance of the
      widget which will cause an error.
      
      Added test without fix fails with error:
      
        TypeError: Cannot read property 'attr' of undefined
          at Class.setIDForLabel (/web/static/src/js/fields/abstract_field.js:324:35)
      
      because as said, the function is called on the editable widget that is
      removed and replaced with readonly widget at that point.
      
      opw-2154471
      closes #43137
      
      closes odoo/odoo#43244
      
      X-original-commit: 6f5ca16524be7c5bb45b03e7421154a20edc4cf6
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      b048a6fc
  7. Jan 15, 2020
  8. Jan 09, 2020
  9. Jan 14, 2020
Loading