Skip to content
Snippets Groups Projects
  1. Jun 19, 2020
    • Jorge Pinna Puissant's avatar
      [FIX] stock: clean lot when put in pack · eac8c06e
      Jorge Pinna Puissant authored
      
      - Create a product with traceability per LOT enabled and a barcode;
      - Enable the option “Delivery Packages” in the inventory settings;
      - Go to "Barcode" app;
      - Scan EAN, the product line will be selected;
      - Scan a LOT, a unit of quantity is incremented at each time the LOT is
        scanned;
      - Put in Pack;
      - Scan again the same EAN to register the next LOT, the product line
        will be selected with remaining quantities;
      - Scan a new LOT number.
      
      Before this commit, as the product line will remain with the old LOT
      number, when the new LOT number is scanned a new line is created. This
      line will miss the initial quantity and the quantities added to this new
      line will not decrement the original line quantity.
      
      Now, the old LOT number is clean when the Put in Pack function is
      called.
      
      opw-2270781
      
      closes odoo/odoo#53319
      
      X-original-commit: 01bf263acbe406d45a4b7a5358bdcdfb70c1d9ed
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      eac8c06e
    • Nicolas Martinelli's avatar
      [FIX] sale_timesheet: clean context · 4a0348fe
      Nicolas Martinelli authored
      
      - Modify `timesheet_action_all` to display the tree view before the grid
        view
      - In the quotation tree view, order by Status, group by Salesman and
        save as filter
      - Open a SO with timesheets
      - Clck on the 'Timesheets' stat button
      
      An error occurs because the `orderedBy` context key is added in the
      action context.
      
      The purpose of replacing the action context is to remove the default
      filters. We can simply set an empty dict to avoid any unwanted keys.
      
      opw-2278618
      
      closes odoo/odoo#53302
      
      X-original-commit: 4fc6ec94
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      4a0348fe
    • Martin Trigaux's avatar
      [I18N] l10n_lu: update CoA translations · 168762a7
      Martin Trigaux authored
      
      Update translation files to match the latest content
      
      Load also translations for fr_BE
      It's common to use fr_BE for Belgian people working in Luxembourg
      
      opw-2278849
      
      closes odoo/odoo#53288
      
      Related: odoo/enterprise#11287
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      168762a7
    • std-odoo's avatar
      [FIX] iap: fix IAP account creation · 32caf74f
      std-odoo authored
      
      Bug
      ===
      Install CRM, then go to the lead kanban view and try to generate leads.
      An error will be raised.
      
      Technical
      =========
      In the "iap.account" model, in the `get` method, we can create the IAP
      account if it doesn't exist yet. Since 5307f47d
      the operation is done in a different SQL cursor than the current one.
      
      The reason is that we need to commit the change, and committing the current
      SQL cursor can cause issue and break some flows (mainly if it's not done
      at the very beginning/end of the flow).
      
      In the current code, we cache the `account_token` to be able to read it
      with the current SQL cursor (otherwise, the current cursor has no access
      to the field because change has not yet being committing for it).
      
      But, the cache is invalidated when the "IAP account SQL cursor" is closed.
      
      ```python
      with self.pool.cursor() as cr:
          ...
          IapAccount = self.with_env(self.env(cr=cr))
          account = IapAccount.search(domain, order='id desc', limit=1)
          if not account:
              if not force_create:
                  return account
              account = IapAccount.create({'service_name': service_name})
          # fetch 'account_token' into cache with this cursor,
          # as self's cursor cannot see this account
          account.account_token
          # <---- Cache is invalidated here
      ...
      ```
      
      So we can not access the the field value after the invalidation.
      
      Solution
      ========
      The solution is the store the `account_token` value before closing the
      "IAP account SQL cursor" and then, after closing it, we add it in the cache.
      
      Task-2277733
      
      closes odoo/odoo#53285
      
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      32caf74f
  2. Jun 18, 2020
  3. Jun 19, 2020
  4. Jun 18, 2020
    • crece365's avatar
      [CLA] signature for crece365 · 03fb98f8
      crece365 authored
      
      Done at odoo/odoo#53103
      
      closes odoo/odoo#53262
      
      X-original-commit: b6bce16b
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      03fb98f8
    • Olivier Dony's avatar
      [REV] Revert c43647f0: "[FIX] odoo: Traceback when creating a new contact" · e220c5a2
      Olivier Dony authored
      
      This reverts commit c43647f0.
      
      That change was not tested properly and can cause unforeseen errors
      because it has far-reaching consequences, modifying the fallback
      language on all requests.
      
      One of the consequences is an alteration of the behavior of the
      translation function `_()` due to the absence of a default language. For
      users with no language set, it will now translate False/None values as
      False/None, rather than the empty string fallback. Code that was not
      prepared to deal with those non-str translations will now crash.
      
      Besides, 'en_US' is a hardcoded default used in many areas of the code,
      and we cannot get rid of it like this, especially in a stable series.
      
      Cfr #52758
      
      closes odoo/odoo#53254
      
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      e220c5a2
    • jvm-odoo's avatar
      [FIX] website_slides: fix youtube URL params ignored · 1a885ffb
      jvm-odoo authored
      
      Issue
      
      	- Install website slides
      	- Create a slide with document url =
      	  a youtube video URL with params like ?rel=0
      	- Check it on the website with debugger
      
      	The iframe url doesn't have ?rel=0
      
      Cause
      
      	We only take the video ID and pass it
      	to a predefined string. We add light
      	theme params too.
      
      Solution
      
      	Split the given url in order to
      	get the params and pass it to
      	the predefined string.
      
      OPW-2275928
      
      closes odoo/odoo#53233
      
      X-original-commit: c9bd6267
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      1a885ffb
    • Xavier ALT's avatar
      [FIX] account: fix error when computing payment destination account · dfb65113
      Xavier ALT authored
      
      Fix forward-port issue introduced in 3d05714f
      
      OPW-2192639
      
      closes odoo/odoo#53215
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      dfb65113
    • Xavier Morel's avatar
      [FIX] mail: when warning about password user, fetch partner as su · d18d2260
      Xavier Morel authored
      
      The superuser is already used to check whether modules are installed
      with demo data and create the notification.
      
      It was not used for accessing the admin partner though, so in the case
      where a user is logging in with the password "admin" and with no
      access to `partner_admin` it's going to blow up the login process
      despite no reason to.
      
      Admittedly this is somewhat difficult to achieve in "standard" odoo,
      it was only discovered because 2FA (odoo/odoo#33928) can reach this
      point without having a "proper" session set up as that set up is
      delayed until after the MFA step has succeeded while
      `_admin_password_warn` is part of the redirection flow from the
      initial login (user/password input).
      
      closes odoo/odoo#53203
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      d18d2260
    • alt-odoo's avatar
      [FIX] base: incorrect default lang when converting amount to text · 247f2591
      alt-odoo authored
      
      In case no lang is set on the current user, we should fallback on the first
      langage installed using get_lang tool.
      
      closes odoo/odoo#53213
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      247f2591
    • jvm-odoo's avatar
      [FIX] sale: fix no_variant price extra context propagation · 19b936b0
      jvm-odoo authored
      
      Issue
      
      	- Install Sales
      	- Enable discounts & pricelists
      	- Create a product
      		- 2 variants:
      			- first with "create variant" set to Always
      			- second set to Never
      	- Create a SO
      	- Pricelist setting "without_discount"
      	- Add the product with product configurator
      
      	The line price is not correct (only Always taken in account)
      
      Cause
      
      	When the variant has Create Variant set to Never
      	we pass the extra money in the context.
      
      	When we have a pricelist with "without_discount"
      	this context is not propagated correctly and it's lost
      
      Solution
      
      	Pass the product directly if it's not empty which
      	have the context set.
      
      OPW-2246102
      
      closes odoo/odoo#53200
      
      X-original-commit: 68628206
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      19b936b0
  5. Jun 11, 2020
  6. Jun 18, 2020
  7. Jun 16, 2020
    • Xavier ALT's avatar
      [FIX] account: fix payment posting when user encoding one for another company · 3d05714f
      Xavier ALT authored
      
      Consider a multi-company database with user A allowed on multiple
      companies (ex: YourCompany (USD), Belgian Company (EUR))
      
      - user A switch to "YourCompany"
      - Go to Accounting / Sales / Documents / Payment
      - Create a new payment, with:
      
        * Payment Type = "Received Money"
        * Partner Type = "Customer"
        * Partner = "Agrolait"
        * Payment Journal = "Bank (EUR)"
          (i.e. journal of "Belgiam Company")
        * Payment Amount = "200" "EUR"
      
      - Click on "Confirm"
      
      => An error is raised "Cannot create moves for different companies."
      
      This commit ensure that when creating the payment journal entry, the
      `destination account` is always computed relative to the payment's
      company and not the current company of the user.
      
      OPW-2192639
      
      closes odoo/odoo#53039
      
      X-original-commit: 0bcf3518
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      3d05714f
  8. Jun 17, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: do not auto reconcile void writeoff lines · e7964850
      Andrea Grazioso (agr-odoo) authored
      
      1. Create a vendor bill with 1 line @ 1000$ and Tax 15%. Post.
      2. Go to Accounting>vendor>payment. Create a payment to the same
      vendor for 1149.99
      There is a difference of 0.01 between the payment and the vendor bill.
      3. Reconcile bill and payment, but write-off 0.01 and place a tax of 15%
      included
      
      The user receive the following error once he click on reconcile.
      "Something went wrong! You are trying to reconcile some entries
      that are already reconciled."
      Indeed the writeoff line create a 0.0 credit/debit tax line which is
      automatically reconciled on creation
      
      opw-2267900
      
      closes odoo/odoo#53115
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      e7964850
    • Anh Thao Pham (pta)'s avatar
      [FIX] account: fix access rights error when opening tax report · 517a13b9
      Anh Thao Pham (pta) authored
      - Use an User with Accounting access rights, but without Admin access rights (e.g. Marc Demo)
      - Go to Accounting > Reporting > Tax Report
      An access rights error is triggered.
      
      opw-2275552
      opw-2275115
      
      closes odoo/odoo#53168
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      517a13b9
    • Nicolas Martinelli's avatar
      [FIX] stock_account: company of anglo-saxon AML · 9af6a871
      Nicolas Martinelli authored
      
      - Create 2 companies A & B
      - Create a product with automatic valuation
      - Switch to company A
      - Create a SO for 1 unit of the product, validate and deliver
      - Genrerate the invoice
      - Switch to company B, but keep company A allowed
      - Post the invoice
      
      An error is raised because of inconsistent company:
      
      > Some records are incompatible with the company...
      
      This occurs because the anglo-saxon lines are created in accounts
      belonging to company B instead of company A.
      
      Since the product accounts are property fields, using `force_company` in
      the context allows the selection of the right accounts.
      
      opw-2276657
      
      closes odoo/odoo#53158
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      9af6a871
    • Goffin Simon's avatar
      [FIX] repair: Unable to set default on repair order for invoicing address · 81303285
      Goffin Simon authored
      
      On a SO, you can set a default delivery address or a default invoicing address according to the customer.
      The same behavior has been applied on repair order.
      
      opw:2277679
      
      closes odoo/odoo#53117
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      81303285
    • Nicolas Martinelli's avatar
      [FIX] repair: translate sale description · b4fefeec
      Nicolas Martinelli authored
      
      Translate the sale description for products and operations.
      
      opw-2274120
      
      closes odoo/odoo#53130
      
      X-original-commit: f713994e
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      b4fefeec
    • jvm-odoo's avatar
      [FIX] web: load_translation fallback to url language · 2bbb8fbf
      jvm-odoo authored
      
      This commit is fine tuning of 9f142c8ff5a383.
      
      Apparently, context_get callback is never called. I
      guess this is due to the fact that we are higher.
      
      context_get is defined in public/public_root.js and
      we are in core/session.js
      
      The only way to fix is to retrieve the HTML tag language.
      
      OPW-2244843
      
      closes odoo/odoo#53116
      
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      2bbb8fbf
    • jvm-odoo's avatar
      [FIX] web: fix in and not in js domain · 7e3fbfaf
      jvm-odoo authored
      
      This commit fix the in and not in operators
      in domain.js.
      
      _.contains works only if you have an array
      in the left part.
      
      So if you have an array in the right part
      it will not work correctly.
      
      Using _.intersection solves the problem.
      
      OPW-2274990
      
      closes odoo/odoo#52966
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      7e3fbfaf
    • Nasreddin (bon)'s avatar
      [FIX] hr_expense: Update payment states after moves updated · aea8536a
      Nasreddin (bon) authored
      Issue
      
      	- Configure bank journal to post at bank reconciliation
      	- Create 2 expenses paid by company
      	- Create a report for the two expenses
      	  (make sure bank journal configured in the first step is used)
      	- Submit, approve and post journal entries
      
      	Error message : "You cannot modify a journal entry linked to
      	a posted payment."
      
      Cause
      
      	Since the payment state of expenses lines is updated one by one
      	in related move, the first expense had already a 'posted'
      	state when updating second expense line, who go against
      	_validate_move_modification validation.
      
      Solution
      
      	Update payments state only after updating all moves lines.
      
      opw-2275686
      
      closes odoo/odoo#53080
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      aea8536a
  9. Jun 15, 2020
  10. Jun 17, 2020
    • Paul Morelle's avatar
      [FIX] odoo: stop bloating sys.meta_path · 175928cd
      Paul Morelle authored
      
      Every call of initialize_sys_path was adding two new hooks to the
      sys.meta_path, resulting in very long loading times on databases having
      a lot of modules.
      
      For example, 2.27s instead of 752 on a database having 130 installed
      modules.
      
      References:
      - odoo/odoo#45780
      - odoo/odoo#45662
      
      closes odoo/odoo#53098
      
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      175928cd
  11. Jun 16, 2020
    • Nicolas Martinelli's avatar
      [FIX] sale_mrp: delivered qty on sub-kits · 972eab4b
      Nicolas Martinelli authored
      
      - Create 4 products A, B, C, D
      - Create a product AB, which is a kit made from A & B
      - Create a product CD, which is a kit made from C & D
      - Create a product ABCD, which is a kit made from AB & CD
      - Create a SO with 1 unit of ABCD, validate
        => a picking with A, B, C and D is created
      - Validate the picking
      
      The delivered quantity remains zero on the SO.
      
      This happens because we don't find any `relevant_bom`. Indeed, the
      `bom_line_id` written on the stock moves correspond to products AB & CD,
      but they do not correspond to ABCD.
      
      We fall back on the 'all-or-nothing' policy.
      
      opw-2273392
      
      closes odoo/odoo#53075
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      972eab4b
    • jerome hanke (jhk)'s avatar
      [FIX] base: keep activity after partner merged · ac54a564
      jerome hanke (jhk) authored
      
      Steps to reproduce:
      - install contacts
      - go to any 2 contacts and add a message and an activity to the chatter
      - go to the list view > select the 2 contacts > action > merge
      - click on the remaining contact and refresh
      
      Previous behavior:
      the activities have not been merged
      
      Current behavior:
      activities are merged
      
      opw-2263853
      
      closes odoo/odoo#53049
      
      X-original-commit: 9960def5
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarmightyjol <jhk-odoo@users.noreply.github.com>
      ac54a564
    • oco-odoo's avatar
      [FIX] account: make tax audit computation work with more complex CABA uses · 1e740e98
      oco-odoo authored
      
      Before this, it was impossible to reconcile an invoice with a credit note, as the tax_audit field's computation found two invoice lines while it expected only one, and crashed.
      
      Note that our current tax report does still not handle all the cases properly:
      
      - Invoices with negative lines using cash basis taxes won't work well, as we can't differentiate a credit note from an invoice using only debit and credit.
      
      - Misc entries reconciled together with cash basis taxes on them ("faking" the invoice and payment) won't work well either, as both of them have the 'entry' type.
      
      >> This commit is a temporary fix, essentially made to unlock customers blocked byt this issue. Another, more complete, fix is coming soon.
      
      closes odoo/odoo#53038
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      1e740e98
    • Goffin Simon's avatar
      [FIX] point_of_sale: Wrong company on report · 59f5e576
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider two companies C1 and C2
      - Let's consider that the default company of the current user U is C1
      - Log in C2 (only)
      - Print the POS details report
      
      Bug:
      
      The header of C1 was displayed.
      
      opw:2274282
      
      closes odoo/odoo#52985
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      59f5e576
  12. Jun 10, 2020
    • Goffin Simon's avatar
      [FIX] odoo: Traceback when creating a new contact · c43647f0
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a new instance with default installed language 'en_US'
      - Install CRM
      - Activate a second language (e.g. en_GB)
      - Set that language in all users
      - Inactivate default language 'en_US'
      - Reset the language of your current user (no value)
      - Go to contact and try to create a new one
      
      Bug:
      
      A traceback was raised because the lang en_US did not exist.
      
      opw:2267711
      
      closes odoo/odoo#52758
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      c43647f0
  13. Jun 15, 2020
  14. Jun 12, 2020
    • Adrien Horgnies's avatar
      [FIX] sale: set payment type to form · 47f7230c
      Adrien Horgnies authored
      
      current expression implies that any payment of a quote from the portal (/my/quotes) will try to save a token whenever the user says they want the customer to pay online, which seems bizarre. Normally you'd only want that for quotes with subscription products, and there is an override of that method in sale_subscription for that specific case.
      
      closes odoo/odoo#52896
      
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      47f7230c
  15. Jun 14, 2020
    • jerome hanke (jhk)'s avatar
      [FIX] crm: opportunity meetings filters are set based on id · b9abc757
      jerome hanke (jhk) authored
      
      Steps to reproduce:
      - install crm
      - go to crm > configuration > settings > activate leads
      - go to a contact > click the "opportunity" smart button >
      create an opportunity > select the newly created opportunity > click
      the "meetings" smart button
      
      Previous behavior:
      meetings are filtered with 'search_default_opportunity_id' set to active_id.
      active_id is referring to the partner_id in this case. this leads to
      a cache miss error.
      
      Current behavior:
      meetings are filtered by the right opportunity (current id).
      
      opw-2272325
      
      closes odoo/odoo#52947
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      b9abc757
  16. Jun 15, 2020
Loading