Skip to content
Snippets Groups Projects
  1. Feb 19, 2021
    • Alvaro Fuentes's avatar
      [IMP] tests: add test_sequence order for tests · 8aa4f424
      Alvaro Fuentes authored
      
      We have some tests in odoo/upgrade that are sensitive to the order on
      which they are executed. Specifically: IntegrityCase tests need to be
      run after all UpgradeCase tests across all Odoo modules.
      
      To support this we implemented a sorting mechanism for tests based on
      the test_sequence class attribute. This is intended to be used by meta
      cases, not by individual tests.
      
      closes odoo/odoo#66521
      
      Related: odoo/upgrade#2184
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      8aa4f424
  2. Feb 26, 2021
  3. Feb 22, 2021
  4. Feb 18, 2021
    • Thibault Francois's avatar
      [IMP] crm|mail: Use flanker to check email correctness · 9b4c1014
      Thibault Francois authored
      
      Context
      -------
      Lead assignement is now based on PLS probability.
      We want to avoid giving the same score to real email addresses
      and email addresses that are just well formed
      
      Flanker try to acheive that be checking specific
      criteria according to the domain, check the dns and mx record
      
      Improvement
      -----------
      Define a mail_validate function seach as phone_validate.
      If flanker is installed, use flanker for validation of
      email addresses else use email_normalize.
      It should help the PLS to give a bad score to well formed addresses
      that flanker suspect to be wrong.
      
      Setup
      -----
      NB: flanker is not available as debian package, we make it optional
      
      To install flanker
      ```
      pip install flanker
      pip install redis
      pip install dnsq
      ```
      
      If you have installed it as root you may need to run
      ```py
      from flanker.addresslib import address
      ```
      as root for the first initialisation
      
      closes odoo/odoo#66429
      
      X-original-commit: f540976c8751e2bf402fed8db830ec0fbf98f654
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9b4c1014
  5. Feb 26, 2021
    • Denis Ledoux's avatar
      [FIX] purchase_stock: `on_time_rate` product other company than PO · e00277fb
      Denis Ledoux authored
      
      - User in company A,
      - Purchase order in company A,
      - Product in company B
      
      ```
        File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/res_partner.py", line 23, in _compute_on_time_rate
          ]).filtered(lambda l: l.product_id.product_tmpl_id.type != 'service' and l.order_id.state in ['done', 'purchase'])
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5279, in filtered
          return self.browse([rec.id for rec in self if func(rec)])
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5279, in <listcomp>
          return self.browse([rec.id for rec in self if func(rec)])
        File "/home/odoo/src/odoo/14.0/addons/purchase_stock/models/res_partner.py", line 23, in <lambda>
          ]).filtered(lambda l: l.product_id.product_tmpl_id.type != 'service' and l.order_id.state in ['done', 'purchase'])
        File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 2483, in __get__
          return super().__get__(records, owner)
        File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 998, in __get__
          record._fetch_field(self)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3072, in _fetch_field
          self._read(fnames)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3183, in _read
          raise self.env['ir.rule']._make_access_error('read', forbidden)
      odoo.exceptions.AccessError: Due to security restrictions, you are not allowed to access 'Product' (product.product) records.
      ```
      
      If you do not share products between companies
      (if the multi-company record rule for `product.template` is enabled)
      then you are not supposed to use a product from another company in a purchase order.
      
      However, this is possible to land in the case if you enable
      the multi-company record rule after you created some purchase orders,
      using products from other companies.
      
      Adding `sudo()` just to get the type of product
      doesn't cost much to support that case
      
      upg-8277
      
      closes odoo/odoo#66956
      
      X-original-commit: a08ba4be
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      e00277fb
    • Raphael Collet's avatar
      [FIX] core: convert_to_write() of x2many field with new records · b652d84c
      Raphael Collet authored
      
      When comparing the values of a new record with its origin, x2many fields
      are always different because we compare new records with real records.
      For instance, converting the value of a one2many field where lines have
      a many2many field always returns update commands for the many2many
      field.
      
      closes odoo/odoo#66950
      
      X-original-commit: 03a4137c
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      b652d84c
    • Francois (fge)'s avatar
      [FIX] base: @odoo-module alias ending with **/ · 7b53bb4b
      Francois (fge) authored
      
      When you define an @odoo-module with an alias without any space between
      the alias and the **/, the alias contains the **/.
      The purpose of this commit is to no longer add the **/ to the alias.
      
      Example:
      /** @odoo-module alias=web.base**/
      
      Before:
        odoo.define(`web.base**/`, function(require) {
      After:
        odoo.define(`web.base`, function(require) {
      
      closes odoo/odoo#66929
      
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      7b53bb4b
    • Adrien Widart's avatar
      [FIX] website_sale_digital: ignore Note/Section · 84ce701b
      Adrien Widart authored
      
      When downloading the digital file, if there exists one SO linked to the
      current customer and that contains a Note/Section, the web page will be
      redirected to the "Internal Server Error" web page.
      
      To reproduce the error:
      (Need sale_management)
      1. Create a customer C
      2. Grant C portal access
      3. Create a product P
          - Add a digital attachment
      4. Create a SO
          - Customer: C
          - Add product P
          - Add a note
      5. Save, Confirm, Create Invoice, Register Payment
      6. Sign in with P
      7. Consult the SO web page
      8. Download the file attached to the SO line
      
      Error: The page is redirected to the "Internal Server Error" web page.
      
      When downloading the document, the module checks the customer's access.
      To do so, it gets all relevant invoices and free products. Here is the
      problem, when getting the free products, the domain includes the SO
      lines used for Section and Note. As a result, when it tries to read the
      product of such a line, this will raise an error.
      
      OPW-2419478
      
      closes odoo/odoo#66931
      
      X-original-commit: 95ba17ae
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      84ce701b
    • Jeremy Kersten's avatar
      [FIX] http_routing: url_rewrite return now a tuple · 3e238439
      Jeremy Kersten authored
      
      Fix of refactoring 91b9dced
      
      closes odoo/odoo#66927
      
      X-original-commit: 03a318ff36949c80008ae35b4c744272c9986b9e
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      3e238439
    • Odoo's Mergebot's avatar
      [MOV] hr_work_entry_contract,hr_work_entry_holidays: move from enterprise to community · 0275085d
      Odoo's Mergebot authored
      
      Before this commit, hr_work_entry_contract and hr_work_entry_holidays were defined in enterprise but those modules could be integrated with some community applications, like hr_attendance.
      
      taskid: 2222790
      
      --
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      closes odoo/odoo#66247
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Unverified
      0275085d
    • Arnaud Joset's avatar
      [IMP] hr_work_entry_holidays: Remove enterprise features · 333e06a7
      Arnaud Joset authored
      Before this commit, the hr_work_entry_holidays had remaining enterprise views.
      These views are now provided by the hr_work_entry_holidays_enterprise module.
      
      taskid: 2222790
      333e06a7
    • Arnaud Joset's avatar
      [IMP] hr_work_entry_contract,hr_work_entry_holidays: cleaning style · 793fe22f
      Arnaud Joset authored
      Before this commit, the imported module would trigger some runbot warnings.
      
      taskid: 2222790
      793fe22f
    • Arnaud Joset's avatar
      [IMP] hr_contract,hr_work_entry_contract: remove enterprise features · 7f126cec
      Arnaud Joset authored
      Before this commit, the hr_work_entry_contract contained enterprise views/features that could not be integrated in community.
      These features are now provided by the hr_work_entry_contract_enterprise module.
      
      taskid: 2222790
      7f126cec
    • Arnaud Joset's avatar
      [MOV] hr_work_entry_holidays: move to community. · baa4dde1
      Arnaud Joset authored
      Before this commit, the module dependencies: hr_holidays and hr_work_entry were already defined in community.
      As they could be integrated with some community applications, like hr_attendance or hr_holidays, it is more coherent to move them to community.
      
      Taskid: 2222790
      baa4dde1
    • Arnaud Joset's avatar
      [MOV] hr_work_entry_contract: move to community. · c6998b3b
      Arnaud Joset authored
      Before this commit, the module dependencies: hr_contract and hr_work_entry were defined in community.
      As they could be integrated with some community applications, like hr_attendance or hr_holidays, it is more coherent to move them to community.
      
      Taskid: 2222790
      c6998b3b
    • Shahnawaz Idariya's avatar
      [IMP] fleet: Improve the kanban view and mobile UI. · 8591b4f6
      Shahnawaz Idariya authored
      
      Purpose of the task is to improve the mobile UI and kanban view of
      the service, contract, odometer, menufacturer and vehicle.
      
      So in this commit,
       - Remove the record link from odometer and service kanban view.
       - Added the stage in service kanban view.
       - Display the Expiry Date in red when contract is expired.
       - Redirect to model view when we click on kanban card of the
      manufacturer and add the properties dropdown to open the record
       - Also improve the some ui for small screen
      
      closes odoo/odoo#62292
      
      Taskid: 2348332
      Related: odoo/enterprise#14959
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      8591b4f6
    • Nicolas Lempereur's avatar
      [FIX] web_editor: have video button even if sanitized · 3eb61dca
      Nicolas Lempereur authored
      
      If a field is sanitized, a6e2b484 would hide the video button because
      the video does not show in backend. It is better for the consistency but
      if the field appear in frontend, the video would still show so we
      prevent something that worked (but is very not user friendly when
      editing in backend).
      
      This changeset go back to the previous behavior (keeping the code
      simplification), at one point there should be a fix so at least when
      editing we see the video (currently we see an empty div in given
      conditions).
      
      opw-2463746
      
      closes odoo/odoo#66920
      
      X-original-commit: 73f57819
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      3eb61dca
    • Jeremy Kersten's avatar
      [IMP] website: make refresh routes less visible · 2c3106c3
      Jeremy Kersten authored
      
      Primary color lets imagine that it is the primary action to be done to update
      the routing. While it is just to refresh the url_from list if you have missing
      route (new module installed, ...)
      
      Maybe we should just remove this button at the end.
      
      closes odoo/odoo#66919
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      2c3106c3
    • Christophe Monniez's avatar
      [FIX] packaging: fix typo in control file · 766717d3
      Christophe Monniez authored
      
      During the resolution of conflicts in odoo/odoo#66784, a typo was
      introduced in debian/control file.
      
      closes odoo/odoo#66916
      
      X-original-commit: ccadcba6
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      766717d3
  6. Feb 25, 2021
    • Goffin Simon's avatar
      [FIX] mrp: Existing operations can only be added to one BOM · f78e04e0
      Goffin Simon authored
      
      Generic operations will be applied for every manufactured product passing
      through the work center.
      
      An operation linked to a bom will only be applied when the specific manufactured bom is produced
      
      So on a BOM, every operations must be created for this specific BOM
      
      The widget many2many is wrong because it will overwrite the generic operations
      
      opw:2458974
      
      closes odoo/odoo#66888
      
      X-original-commit: a430c06ec6ec286a2d9ef55de6eebec60feeae3f
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      f78e04e0
  7. Feb 26, 2021
  8. Feb 25, 2021
  9. Feb 24, 2021
  10. Feb 25, 2021
    • Géry Debongnie's avatar
      [IMP] web: display annotated tracebacks in debug=assets · cbadef93
      Géry Debongnie authored
      
      Warning: this commit savagely patches qunitjs sourcecode. I know... I
      feel bad.
      
      Since we updated the way debug=assets work, we have a new problem in the
      qunit test suite: the tracebacks displayed by QUnit are relative to the
      bundle file, not the original file, which is annoying in practice.
      
      There is really no good way that I could find to integrate with QUnit to
      perform that task, so I had to do it the ugly way: modify QUnit from the
      inside to use the StackTrace library to annotate the traceback with the
      proper information.
      
      closes odoo/odoo#66771
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      cbadef93
    • Géry Debongnie's avatar
      e2b85d46
Loading