Skip to content
Snippets Groups Projects
  1. Jul 04, 2021
  2. Jul 02, 2021
  3. Apr 16, 2021
    • Mohammed Shekha's avatar
      [IMP] web: display sequence field as non editable · 9f00dcae
      Mohammed Shekha authored
      
      Before this commit: when editable listview has sequence field with handle
      widget and user edits row it is displayed with white background, while user
      can not change it in edit mode so it should be displayed with grey background
      
      After this commit: sequence field will be displayed with grey background in
      editable listview in edit mode.
      
      task-2507971
      
      closes odoo/odoo#69371
      
      Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
      9f00dcae
  4. Jul 02, 2021
  5. Jul 01, 2021
    • Rémy Voet (ryv)'s avatar
      [FIX] purchase: fix forbidden access of partner · f29b1e81
      Rémy Voet (ryv) authored
      
      Issue:
      For purchase user, which doesn't have the "Contact Creation" can't
      create a purchase, get a AccessError.
      
      The fields `receipt_reminder_email` and `reminder_date_before_receipt`
      should be writable also for purchase user which doesn't have access
      to write and create `res.partner`.
      
      close odoo/odoo#64135
      
      closes odoo/odoo#64319
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      f29b1e81
    • Fernanda Hernández's avatar
      [FIX] website_sale: use sudo to search account.fiscal.position to public user · 53dc9f62
      Fernanda Hernández authored
      Currently if public user has country_id, following traceback is raise
      when /shop URL is opened:
      
      Traceback (most recent call last):
      File "/.repo_requirements/odoo/odoo/addons/base/models/qweb.py", line 331, in _compiled_fn
      return compiled(self, append, new, options, log)
      File "<template>", line 1, in template_website_sale_products_item_306
      File "/.repo_requirements/odoo/addons/website_sale/models/product.py", line 294, in _get_combination_info
      fpos = self.env['account.fiscal.position'].get_fiscal_position(partner.id).sudo()
      File "/.repo_requirements/odoo/addons/account/models/partner.py", line 184, in get_fiscal_position
      fp = self._get_fpos_by_region(delivery.country_id.id, delivery.state_id.id, delivery.zip, vat_required)
      File "/.repo_requirements/odoo/addons/account/models/partner.py", line 141, in _get_fpos_by_region
      fpos = self.search(domain_country + state_domain + zip_domain, limit=1)
      File "/.repo_requirements/odoo/odoo/models.py", line 1708, in search
      res = self._search(args, offset=offset, limit=limit, order=order, count=count)
      File "/.repo_requirements/odoo/odoo/models.py", line 4485, in _search
      model.check_access_rights('read')
      File "/.repo_requirements/odoo/odoo/models.py", line 3331, in check_access_rights
      return self.env['ir.model.access'].check(self._name, operation, raise_exception)
      File "<decorator-gen-33>", line 2, in check
      File "/.repo_requirements/odoo/odoo/tools/cache.py", line 90, in lookup
      value = d[key] = self.method(*args, **kwargs)
      File "/.repo_requirements/odoo/odoo/addons/base/models/ir_model.py", line 1792, in check
      raise AccessError(msg)
      odoo.exceptions.AccessError: You are not allowed to access 'Fiscal Position' (account.fiscal.position) records.
      
      This operation is allowed for the following groups:
      - Accounting/Advisor
      - User types/Internal User
      - User types/Portal
      
      Contact your administrator to request access if necessary.
      
      Error to render compiling AST
      AccessError: You are not allowed to access 'Fiscal Position' (account.fiscal.position) records.
      
      This operation is allowed for the following groups:
      - Accounting/Advisor
      - User types/Internal User
      - User types/Portal
      
      Contact your administrator to request access if necessary.
      Template: website_sale.products_item
      Path: /t/t[2]
      Node: <t t-set="combination_info" t-value="product._get_combination_info(only_template=True, add_qty=add_qty or 1, pricelist=pricelist)"/>
      
      Above was tested and reproduced in an instance of odoo runbot v14.0:
      
      https://youtu.be/GgUnyna_EX8
      
      
      
      That is due to public user has not permission to read model
      account.fiscal.position and in fact in ACL, permission contains
      'public' but is setting group_portal.
      
      closes odoo/odoo#70566
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      53dc9f62
  6. Jun 25, 2021
  7. Jul 01, 2021
  8. Jun 25, 2021
  9. Jun 29, 2021
  10. Jun 30, 2021
    • Romain Tartière's avatar
      [FIX] web: Adjust label#for to match input#id · 979c9d71
      Romain Tartière authored
      
      The #for attribute of the LABEL tag should match the #id of the INPUT
      tag, not it's #name.
      
      This regression was introduced in a1716946
      
      closes odoo/odoo#72252
      
      Signed-off-by: default avatarRomain Tartière <romain@vittoriaconseil.com>
      Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
      979c9d71
    • Habib (ayh)'s avatar
      [IMP] l10n_eu_service: OSS - Automatic Tax and Fiscal Position Mapping for EU Countries · d347eae1
      Habib (ayh) authored
      
      Due to EU e-commerce 'One-Stop Shop' which becomes available on 1 July 2021, EU companies involved in distance sales are able to file their taxes using the new OSS process. Adopting OSS is now simplified in Odoo.
      
      On installation of the module, all companies having a fiscal country in the EU will be processed.
      For all existing domestic taxes in the company, an associated foreign tax (standard rate, reduced rate, etc) is found in the `EU_TAX_MAP`. This mapping will be created in a fiscal position that is automatically detected based on the customers' country.
      
      All that is required from the user, is to review the tax mappings according to the products and services sold by the company.
      
      A refresh button is also available in the odoo settings to redo/update the fiscal positions. This might be useful after adding a new tax.
      
      Note: The tax mapping herein is not intended to cover all possible tax mappings between EU countries, but rather, the most commonly used ones. It is advised that users with special tax cases update the created Fiscal Positions according to their requirements.
      
      Closes [Task 2579615]
      
      closes odoo/odoo#72771
      
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      d347eae1
  11. Jun 03, 2021
  12. Jun 30, 2021
  13. Jun 25, 2021
    • dht-odoo's avatar
      [FIX] test_mail: fix randomly failing activity test case · 962153a0
      dht-odoo authored
      We have a test case 'test_my_activity_flow_employee' that checks user's
      own activty for current day. However, the creation of the activities is
      done with OdooBot, and 'date_deadline' is not being passed. For this
      reason, the default deadline (default value = fields.Date.context_today)
      is set based on the tz of OdooBot (which is Europe/Brussels) and so it
      might happen that the deadline is set on the next day (when test case
      is performed just before mid-night).
      
      In such cases, when we search for today's activites for the employee
      (with absolute current date in domain, which is still before midnight),
      result can be misleading as we expect one activty for the employee but
      none could be found (as deadlines are set for the next day).
      
      This commit fixes the issue by using absolute current for the test case
      (whlie setting 'date_dateline' and while searching records) and thus making
      it more reliable.
      
      Note: The test case was introduced with commit https://github.com/odoo/odoo/commit/6aa3dc609cb13a469492b1a39a8fd9810040f079
      
      
      
      TaskID-2570963
      
      closes odoo/odoo#72396
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      962153a0
  14. Jun 30, 2021
    • Alvaro Fuentes's avatar
      [FIX] core/expression: fix 'not in' for translated fields · 7c4db97e
      Alvaro Fuentes authored
      
      Domain terms of the form `('field', 'not in', [...])` generate incorrect
      queries for translated fields, example (model `res.country`, field `name`):
      ```
      psycopg2.errors.SyntaxError: syntax error at or near "ARRAY"
      LINE 1: ...M "res_country" WHERE "res_country"."name" not in ARRAY['No ...
      ```
      The root cause is that the right part of the term is not converted to
      tuple.
      
      Observed during the upgrade request 16639
      opw-2525553
      
      closes odoo/odoo#72134
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      7c4db97e
  15. Apr 30, 2021
    • Nuno Silva's avatar
      [FIX] mail: use current user company in notification · 3f61d9e2
      Nuno Silva authored
      
      When sending a notification, the company used is:
      
      - company_id of current record or if not available,
      - company_id of author or if no author,
      - company_id of user
      
      This can seem unexpected if the author is the current user and the
      company_id of our user is different than the current company switcher
      company.
      
      With this changeset: the company used is:
      
      - company_id of current record or if not available,
      - company_id of author if author is different than user or,
      - current company in company switcher or if not,
      - company_id of user
      
      opw-2472622
      
      closes odoo/odoo#66859
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      3f61d9e2
  16. Jun 30, 2021
  17. Jun 29, 2021
    • Kamen Zhekov's avatar
      [FW][FIX] Adding error message instead of traceback when cropping pictograms · 3bdd410c
      Kamen Zhekov authored
      
      Description of the issue/feature this PR addresses:
      When trying to crop pictograms, a traceback was issued because they are icons, not images.
      
      Current behavior before PR:
      The user was able to invoke the cropping action on pictograms and received an internal error.
      
      Desired behavior after PR is merged:
      The user can no longer invoke the cropping action on pictograms (icon is hidden if selected item is an icon).
      
      OPW: 2497084
      
      --
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      Manual Forward-Port-Of: #70142
      
      closes odoo/odoo#72953
      
      X-original-commit: 4e1e8d46
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      3bdd410c
    • Goffin Simon's avatar
      [FIX] purchase_requisition: Wrong translation · 947484cd
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      1. Activate the 2 language “’English’ , ‘Spanish (AR) / Español (AR)’ ”
      2. User -> select the language ‘Spanish (AR) / Español (AR)’
      3. Create a new product (Test Product).
      4. Create a another product using “Duplicate” function.
      5. Rename new product name(Test Product -1)
      6. Translate the name ( “Spanish (AR) / Español (AR) : 111 Spanish product “ , “English: English Product” )
      7. create a purchase agreement -> select product “111 Spanish product ” -> Save -> confirm -> new quotation.
      8. Purchase Quotation -> Order line
      
      Bug:
      
      Description shows “Test Item (copia)”
      
      opw:2582778
      
      closes odoo/odoo#72919
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      947484cd
  18. Jun 30, 2021
    • Laurent Stukkens (LTU)'s avatar
      [FIX] sale_timesheet: correctly compute remaining_hours_so · d7c08210
      Laurent Stukkens (LTU) authored
      
      Steps to reproduce:
      
          - Install sale_timesheet with demo data
      
          - Add a UOM 200h with the following characteristics:
      
              - Category: Working Time
              - Type: Bigger than the reference Unit of Measure
              - Bigger Ratio: 25
      
          - Create a new product with the following characteristics:
      
              - Product Type: Service
              - Service Invoicing Policy: Prepaid
              - Unit of Measure: 200h
      
          - Create a Quotation SO1 with the following characteristics:
      
              - Customer: Deco Addict
              - a SOL with product 200h and quantity 1
      
          - Confirm the Quotation SO1
      
          - Create a new project P1 with the following characteristics:
      
              - Timesheets: True
              - Billable: True
      
          - Edit the project and set the customer to Deco Addict
      
          - Create a new task T1 with the following characteristics:
      
              - Project: P1
              - Sales Order Item: SOL of SO1 with product 200h
      
          - Timesheet in the task
      
      Current behavior:
      
          - When timesheeting, the quantity of Remaining Hours on SO is decreased by 200 * nb of hours in timesheet(s).
      
      Expected behavior:
      
          - When timesheeting, the quantity of Remaining Hours on SO is decreased by the number of hours in the timesheet(s).
      
      This behavior was introduced in commit b0f165bb
      
      closes odoo/odoo#72958
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      d7c08210
    • alt-odoo's avatar
      [FIX] lunch: Toggle archive products when archiving a vendor · 1206b0d5
      alt-odoo authored
      
      When a vendor is (un)archived, we should (un)archive all related products
      as well to avoid displaying archived vendors and products in the search
      panel of the Order lunch and Products list views.
      
      closes odoo/odoo#72862
      
      Signed-off-by: default avatarAlex Tuyls <alt-odoo@users.noreply.github.com>
      1206b0d5
  19. Jun 29, 2021
  20. Jun 28, 2021
    • Adrien Widart's avatar
      [FIX] pos_sale: compute weight and volume for sale report · e7f296ae
      Adrien Widart authored
      When selling several times a product in a POS, if the volume and weight
      of this product are defined, the sales report will be incorrect
      
      To reproduce the error:
      1. Create a product P:
          - Product Type: Consumable
          - Available in POS: True
          - Weight: 1
          - Volume: 1
      2. Start a POS session
      3. Sell 3 x P
      4. Sell 1 x P
      5. In Sales > Reporting > Sales, select the pivot view
      6. Remove all filters and add this one:
          - Product Variant: P
      7. In Measures, select "Gross Weight" and "Volume"
      
      Error: Total weight and volume are incorrect, they are equal to 8
      instead of 4
      
      For each POS order line, an SQL request computes several fields to
      generate the associated sale report. Among them, here is how the volume
      is computed:
      https://github.com/odoo/odoo/blob/056246665f02c331ba0589618cf030482709f1da/addons/pos_sale/report/sale_report.py#L60-L63
      
      
      So, let's say we are generating the sale report associated with the POS
      order line of step 3. Since there are not enough constraints in the
      volume calculation, the SQL request will select all POS order lines with
      product P (even those associated with other orders than the one in step
      3) and add up all the volumes. Therefore, the volume of the sale report
      associated with the POS order line from step 3 will be `3 + 1 = 4` which
      is incorrect (it should be 3). Same thing will happen with the sale
      report associated with the POS order line of step 4 (its volume will be
      4 instead of 1). As a result, on pivot view, the volume displayed will
      be the sum of these values, i.e. `4 + 4 = 8`, which is incorrect
      
      The nested SQL request is actually useless and the volume can be
      directly computed.
      
      The problem is the same with the weight.
      
      OPW-2527163
      
      closes odoo/odoo#72845
      
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      e7f296ae
  21. Jun 24, 2021
  22. Jun 29, 2021
    • Anjali's avatar
      [FIX] base: make parent contact lang prevail on DB lang · c30150cf
      Anjali authored
      
      With commit odoo/odoo@83ffe8b we ensured that while creating a child contact, it
      takes language from its parent by default if any, otherwise falls back to DB
      lang.
      
      The fix was done with help of `default_get` method. However after merge of
      odoo/odoo#55995 `default_get` is now called through the onchange for o2m
      fields. Now we don't get the default value of `parent_id` here which
      re-introduced the bug.
      
      This commit fixes the behavior by setting the language from onchange
      while creating the child contact and thus (once again) making the
      language from parent contact prevail on DB lang.
      
      We also re-use default_lang coming from parent in form view, which partially
      reverts odoo/odoo@83ffe8b .
      
      TaskID-2416922
      
      closes odoo/odoo#68009
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      c30150cf
  23. Jun 23, 2021
    • Stéphane Bidoul's avatar
      [FIX] core: install new dependencies of module to upgrade · d5ffe015
      Stéphane Bidoul authored
      
      When a custom module is in 'to upgrade' state,
      and the code has a dependency that is not yet
      installed, Odoo refuses to upgrade it, and
      says the new dependency is unmet.
      
      This commit fixes this by also calling button_upgrade() in this situation,
      and not only for modules in 'installed' state.
      
      This situation arises in a version migration scenario. Custom modules are
      in 'to upgrade' state after migration.
      If one of these custom modules has a new dependency
      after migration, it refuses to upgrade.
      
      closes odoo/odoo#72661
      
      Signed-off-by: default avatarAdrian Torres (adt) <adt@odoo.com>
      d5ffe015
  24. Jun 28, 2021
  25. Mar 08, 2021
    • Mohammed Shekha's avatar
      [FIX] web: reset renderer local state when switching view · 16ccfccb
      Mohammed Shekha authored
      
      before this commit: when switching to form view from listview using Create
      button and then activate some other tab and Discard that record which will
      move back user to list view now again clicking Create button opens form view
      but active tab is last activated form tab instead of first one, this is because
      of local state is not cleared.
      
      after this commit: when form view is switched back to list view using Discard
      button, local state will be cleared, here we are explicitly removing 'active'
      class from all tab and pages of all notebooks.
      
      task-2466057
      
      closes odoo/odoo#67241
      
      Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
      16ccfccb
  26. Jun 28, 2021
    • Mohammed Shekha's avatar
      [FIX] web: calendar sidebar name cropped · 54877e81
      Mohammed Shekha authored
      
      Before this commit: calendar view sidebar filter names were getting cropped
      at bottom, it is because of line-height property which is set to 1.
      
      After this commit: calendar view sidebar filter names will not be cropped
      as line-height property set to 1.5.
      
      task-2519813
      
      closes odoo/odoo#72879
      
      X-original-commit: 4e24df71
      Signed-off-by: default avatarSimon Genin (ges@odoo) <ges@odoo.com>
      54877e81
    • yhu-odoo's avatar
      [FIX] purchase_stock: purchase product route can't be triggered · 81d9dc63
      yhu-odoo authored
      
      To reproduce:
      1. set WH receipt in 3 steps
      2. create a "receipt in 2 steps" route for product
      3. create a PO with product "receipt in 2 steps"
      In inventory, we will see this product still follow the "receipt in 3
      steps" route.
      
      This is caused when we create move for PO, we prepare the route_ids
      according to warehouse's route_ids. After the move has it's own
      route_ids, it will not search for route set on product or product
      category (which should has higher priority over warehouse route).
      To fix it, we remove the route_ids when create the move for PO. A route
      will be found when the move being comfirmed.
      
      Task 2448439
      PR #65509
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      
      backport of af9b9267
      
      closes odoo/odoo#72874
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      81d9dc63
Loading