Skip to content
Snippets Groups Projects
  1. Aug 22, 2021
  2. Aug 20, 2021
    • Alvaro Fuentes's avatar
      [FIX] base: fix ir_attachment read_group · 20fd92d4
      Alvaro Fuentes authored
      
      When called with a `srt` as readgroup parameter we get a traceback.
      Example:
      `read_group([('partner_id', 'in', self.ids)], 'partner_id', 'partner_id')`
      TB:
      ```
       Traceback (most recent call last):
         File "/home/odoo/src/odoo/14.0/odoo/tools/safe_eval.py", line 330, in safe_eval
          return unsafe_eval(c, globals_dict, locals_dict)
         File "", line 2, in <module>
         File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_attachment.py", line 420, in read_group
          if any('(' in field for field in fields + groupby):
       TypeError: can only concatenate list (not "str") to list
       ```
      
       Observed on the upgrade request 22627.
      
      closes odoo/odoo#75413
      
      X-original-commit: 8e7990dd5c069f7b0dba9f3d27f620f0fcad5441
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      20fd92d4
    • Bhavesh Odedra's avatar
      [FIX] account: check if tax name on copy method · 10a5ecce
      Bhavesh Odedra authored
      With this commit, it will check if the tax name is given by external method and take that name if any.
      
      For example,
      vals = {'rate': 5.2, 'name': 'Odoo New Tax'}
      tax_template = self.env['account.tax'].search(domain, limit=1)
      new_tax = tax_template.copy(default=vals)
      
      Current Behavior:
      new_tax.name => 'Odoo New Tax (Copy)'
      
      Instead of 'Odoo New tax'
      
      closes odoo/odoo#75330
      
      X-original-commit: 7ba56a2d
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      10a5ecce
  3. Jul 14, 2021
  4. Aug 20, 2021
    • Thibault Delavallée's avatar
      [REV] crm: remove unnecessary sudo · b4fa1937
      Thibault Delavallée authored
      
      Revert "[FIX] crm: allow regular salesman to convert and merge opportunities"
      This reverts commit 24db93c0.
      
      Indeed adding a sudo at the end of merge process is a strange way to fix
      an unexplained issue about "similar emails". CRM code has been cleaned
      since v14+ and flows should not gain random sudo trying to solve an
      undefined problem.
      
      closes odoo/odoo#75360
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      b4fa1937
  5. Aug 19, 2021
    • Ivan Yelizariev's avatar
      [FIX] website_event: fix flag url in dynamic snippet · ae8403d0
      Ivan Yelizariev authored
      Since Odoo 14.0 flag image is not a binary field anymore [1] and field name is
      changed to `image_url`.
      So, fix it by using the url directly.
      
      STEPS:
      * Flag image is used when user country_code is provided and there are events for
      that country. The user country_code is computed by IP. If you run Odoo locally
      you can temporarly update `get_country_events` to force some country code
      * In a website page add a header-title block first, then add the dynamic snippet
      "Events"
      
      BEFORE: dummy image "no photo yet"
      AFTER: flag image
      
      ---
      
      [1] https://github.com/odoo/odoo/commit/710705b64c0134a5b568d998d0a3eb0df0f541c0
      
      
      opw-2625695
      
      closes odoo/odoo#75319
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      ae8403d0
    • dht-odoo's avatar
      [FIX] website_slides_survey: add context to survey_id · 47894929
      dht-odoo authored
      
      Before this commit when user quick create a certification,
      then it will create record in survey but not with certification
      equals to True. Due to which it will be excluded from domain and
      we will not able to find it in survey_id in elearning.
      
      With this commit we pass certification equals to true and scoring_type
      equals to scoring_without_answers in context of survey_id. So now,
      it will be not excluded in domain('certificate', '=', True) in elearning.
      
      Task Id: 2621296
      
      closes odoo/odoo#75318
      
      X-original-commit: 7b2b00e0
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      47894929
    • Nathan Marotte (nama)'s avatar
      [FIX] mrp : wrong expected duration in WC with capacity · 0429ffaa
      Nathan Marotte (nama) authored
      
      Issue: In work centers with a capacity different than 1, the expected
      duration was wrongly computed
      
      Steps to reproduce :
       1) Install Manufacture, enable Work Centers in Settings
       2) Create a Work Center, Capacity = 2
       3) Create a Product, with Manufacture as route
       4) Create a Bill of Material :
         Add any component
         Add a operation line :
           Work Center = created at 2)
           Duration Computation = based on tracked time last 1 WO
       5) Create a Manufacturing Order for the product 3), confirm
       6) Set the real duration to 00:10, mark as done
       7) Check the BoM Structure & Cost of the BoM 4)
       -> Operations is 00:20
      
      Why is that a bug:
       To compute the expected duration, in mrp_workorder.py L691 we already
       take into consideration the capacity of the work center.
       When computing the time_cycle, we must give a time_cycle for 1 product
       made with capacity 1, so we must first normalize the qty_produced fetch
        from the DB to make like if we only produced the quantity once but in
        the same amount of time
      
      Side-Note: This also solves an issue with the Duration Computation based
       on tracked time. The `limit` keyword was applied after the `group by`
       so we effectively grouped all the operation_ids together, summing
       their quantities and then limiting on the different operation_ids
      
      opw-2562983
      
      closes odoo/odoo#75078
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      0429ffaa
  6. Aug 17, 2021
  7. Jul 19, 2021
  8. Aug 19, 2021
    • Touati Djamel (otd)'s avatar
      [FIX] purchase_stock : prevent wrong destination in PO · 643e093a
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - create 2 warehouses A & B
      - create a new product and add a seller
      - Create an Automated replenishment order of the created product for warehouse A
      - click on “Automate orders”
      - open PO
      - in “other information” tab > change the picking type to the “warehouse B” picking type
      - confirm order
      - click on the receipt
      
      Problem:
      The destination location is “Warehouse A” instead of “Warehouse B”
      The problem also appears after the duplication.
      
      Solution:
      Use the parent_path to check if the location that the user wants to use is below the original warehouse.
      
      opw-2588082
      
      closes odoo/odoo#75306
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      Co-authored-by: default avatarfmdl <florent.mirieu@gmail.com>
      643e093a
  9. Aug 18, 2021
  10. Aug 13, 2021
    • Nathan Marotte (nama)'s avatar
      [FIX] account : Missing onchange for tax recompute · 44403a6c
      Nathan Marotte (nama) authored
      
      Issue: With a custom tax computation that depends on the quantity, when
      the price of the item is 0, when changing the quantity,
      the taxes are not changed
      
      Steps to reproduce :
       1) Install Accounting, and account_tax_python
       2) Accounting > Configuration > Accounting > Taxes : create
       a task :
         Tax Computation: Python Code
         Python code : `result = quantity * 0.3`
       3) Accounting > Customer Invoices > New Invoice
       4) Add a line with a product, unit price = 0, quantity = 2
       5) Change the quantity, the tax does not change
      
      Why is that a bug:
       When the price is 0, changing the quantity doesn't affect
       the price so the onchange is not triggered even though the
       line changed
      
      opw-2559200
      
      closes odoo/odoo#75086
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      44403a6c
  11. Aug 19, 2021
  12. Aug 18, 2021
  13. Aug 17, 2021
  14. Aug 18, 2021
    • Adrien Widart's avatar
      [FIX] mrp: set backorder name with custom sequence name · 076fe045
      Adrien Widart authored
      
      If the prefix of the production sequence contains some dashes, it can
      lead to undesirable behaviors
      
      To reproduce the error:
      (Enable debug mode)
      1. Settings > Technical > Sequences & Identifiers > Sequences, edit "San
      Francisco Sequence production":
          - Prefix: "WH-MO-"
      2. Create a MO
          - Quantity: 2
      3. Confirm, Edit:
          - Quantity: 1/2
      4. (Keep MO's name in mind and) Validate + Create backorder
      
      Error: Backorder's name is "WH-MO-002" instead of "WH-MO-0000X-002".
      Going back to the initial MO, its name became "WH-MO-001" (was
      "WH-MO-0000X")
      
      OPW-2618971
      
      closes odoo/odoo#75130
      
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      076fe045
    • wan's avatar
      [FIX] l10n_ch_qr_iban: do not create new module category · 0793c52b
      wan authored
      
      We do not need to see this bugfix module in the list of modules, and
      certainly not with a new category that shows up in the controlpanel.
      
      closes odoo/odoo#75240
      
      Related: odoo/enterprise#20316
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      0793c52b
    • Adrien Widart's avatar
      [FIX] hr_expense: convert base amount if different currency · d6fd7301
      Adrien Widart authored
      
      In a multi-currencies environment, if the user creates an expense with a
      different currency than the company's, one of the associated account
      move lines will have an incorrect base amount.
      
      To reproduce the issue:
      (Need account_accountant. Let USD be the company's currency)
      1. In Settings, enable "Multi-Currencies"
      2. Edit the currency rates:
          - EUR: 2
          - USD: 1
      3. Create an expense:
          - Currency: EUR
          - Unit Price: 700
          - tax: 15%
      4. Create Report, Submit, Approve, Post Journal Entries
      5. Accounting > Reporting > Tax Report, This Financial Year
      6. Audit of "Tax 15.00%"
      
      Error: Base amount of the expense is $700, which is incorrect. It should
      be either 700€ or $350
      
      OPW-2613547
      
      closes odoo/odoo#74963
      
      X-original-commit: b57cdc9d
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      d6fd7301
    • Achraf (abz)'s avatar
      [FIX] l10n_ch: Don't count foreign iban as qr_iban · e7748ca3
      Achraf (abz) authored
      
      When creating a bill when we specify a French account in the recipient's account we receive the following warning "Please fill in a correct ISR reference in the payment reference. The banks will refuse your payment file otherwise."
      
      This PR adds a condition to limit the verification to Swiss accounts
      
      opw-2581434
      
      closes odoo/odoo#75210
      
      X-original-commit: b0e94b24
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      Signed-off-by: default avatarAchraf <abz-odoo@users.noreply.github.com>
      e7748ca3
  15. Aug 17, 2021
    • Philémon van Helden's avatar
      [FIX] base_vat: properly checks XI VAT numbers · 0268986b
      Philémon van Helden authored
      
      In 12.0+ when adding an XI (Northern Ireland) VAT number on a vendor and specifying the country as United Kingdom, an error shows the VAT number as not valid. This is because the method to check specifically XI VAT numbers doesn't recognize XI as a country, and thus uses the GB VAT number verification, which doesn't recognize XI VAT numbers as it isn't up to date yet.
      
      A temporary method to check XI VAT number was already added, but is never called because XI is not recognized as a country code.
      With this commit, we add a list of known legitimate country codes, that are not considered as such in Odoo.
      
      opw-2534541
      
      closes odoo/odoo#75189
      
      X-original-commit: d8b8ad47
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarpvh-odoo <SwagSamaSempai@users.noreply.github.com>
      0268986b
    • Audric Onockx (auon)'s avatar
      [FIX] hr_holidays: Fix accrual dates based on creation date · 3f7f0feb
      Audric Onockx (auon) authored
      
      Steps:
      1. Create new time off allocation
      2. Set type to accrual and set start date other than present day
      3. Set the accrual to add every month
      4. Validate and run the scheduled action for Accrual Time Off
      5. Check the field 'nextcall' with Studio or editing form view
      Result:
      Nextcall date is set to 1 month after the date of creation of allocation record instead of start date.
      
      Solution:
      Nextcall is now based on start date.
      
      opw-2558480
      
      closes odoo/odoo#75177
      
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      3f7f0feb
    • Nikunj Ladava's avatar
      [IMP] l10n_co: update latam identification type · dc195e7b
      Nikunj Ladava authored
      
      task- 2486484
      
      closes odoo/odoo#74488
      
      Related: odoo/enterprise#19978
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      dc195e7b
    • Anh Thao Pham (pta)'s avatar
      [FIX] web_editor: fix invisible document links when sent via email · a703f257
      Anh Thao Pham (pta) authored
      
      - Go to any record with a chatter (i.e. a SO)
      - Use full composer to send a message
      - In editor, use "File/Image" option to upload a document to the body of the message
      - Upload any document (i.e. a PDF file)
      - PDF icon will appear in the message
      - Send the message
      In the chatter, PDF icon appear in the message, allowing to download the file.
      But in the sent email, the link is present but it is not visible. There is no icon.
      
      Such link is a <a> element with "o_image" class. When converting to inline, an <img>
      element is added with an icon depending on file mime-type.
      However, when getting its value, a cleaning is executed, removing this added <img>.
      
      It should not be cleaned when converting to inline.
      
      opw-2558602
      
      closes odoo/odoo#75204
      
      X-original-commit: 2924d0e9
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      a703f257
    • Philémon van Helden's avatar
      [FIX] website_form_project: prevent errors on task creation from a form · a5d86485
      Philémon van Helden authored
      
      In 14.0, when adding a form to a website and selecting "Create a Task" without
      an active project, an error pops up because no projects are found.
      
      In this commit, we prevent an error from popping up when adding the form
      without projects, by allowing the field to be empty (not required).
      
      task-2580436
      
      closes odoo/odoo#73269
      
      Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
      a5d86485
    • Touati Djamel (otd)'s avatar
      [FIX] hr_holidays: Prevent allocation date_to from switching to another day · 2ddabf08
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      
      Go to your computer's date settings
      Change region, e.g: (US or choose a region with a negative UTC)
      Go to the preferences settings in odoo > Change the timezone to US too
      Go to Time Off app > Manager > Allocations > Create a new one
      Allocation type : "Accrual Allocation"
      Set the end date to, e.g: "04/07/2021"
      save
      
      Problem:
      The end date moves back by one day.
      The field " date_to " is of ”datetime” type, so we use in the view "widget="date"
      Therefore, the user can only choose the date. We save the time in the database at" 00: 00:00 ".
      But as we use in the view "widget="date", after saving the record,
      the datetime will be converted to a date, based on the user's UTC.
      
      For example, in our case:
      in database, date_to = "2021-07-04 00:00:00"
      user UTC = "UTC-6"
      result = "2021-07-04 00:00:00" - 06:00:00 → "2021-07-03 00:18:00"
      
      Solution:
      Remove the widget date to allow a user entering the full date (eg: 2021-07-04 23:00:00), that
      will be stored correctly in UTC afterwards, instead of having the widget making the date switch to
      another day.
      
      opw-2607082
      
      closes odoo/odoo#75193
      
      X-original-commit: ceef1983
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Signed-off-by: default avatarDjamel Touati <DjamelTouati@users.noreply.github.com>
      2ddabf08
    • qsm-odoo's avatar
      [FIX] web_editor: properly compare CSS variables and CSS values · 22b5d905
      qsm-odoo authored
      
      The editor sometimes compare CSS values, in particular in the
      selectStyle method where a given style is not applied if it would have
      no effect (e.g. applying an inline pink background-color is useless if
      the block is naturally pink because of CSS rules). That comparison
      failed when it was comparing 'var(--XXX)' and 'YYY' as 'var(--XXX)' was
      not processed as the CSS variable 'XXX' to be read.
      
      Related to task-2599770
      
      closes odoo/odoo#75188
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      22b5d905
    • Hubert Van de Walle (huvw)'s avatar
      [FIX] sale_crm: always create a new customer when create is selected · e3d47af7
      Hubert Van de Walle (huvw) authored
      
      When clicking on the 'New quotation' action,
      if no current customer is linked to the lead,
      a popup opens with the following options:
      - Create a new customer
      - Link to an existing customer
      - Do not link to a customer
      
      If odoo found a potential matching customer but we decide it is the
      wrong one and select the first option, a new one should always be
      created
      
      opw-2545065
      Task-2622793
      
      closes odoo/odoo#74988
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      e3d47af7
    • Touati Djamel (otd)'s avatar
      [FIX] hr_expense: fix the approval of multiple expense sheet · bc421407
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Go to Expenses > Expense Reports to approve
      - Select expense reports with different managers
      - Click on the Action drop-down button > Approve report
      
      Problem:
      Traceback is triggered because we try to access `"self.user_id"` (manager) of expenses as a single element,
      While we have several `”user_id”`
      
      Solution:
      - Filter the `"hr.expense.sheet"` which must be approved
      - Approve each expense separately
      
      opw-2622837
      
      closes odoo/odoo#75093
      
      Signed-off-by: default avatarDjamel Touati <DjamelTouati@users.noreply.github.com>
      bc421407
  16. Aug 13, 2021
  17. Aug 16, 2021
Loading