Skip to content
Snippets Groups Projects
  1. Jun 27, 2019
    • Romain Derie's avatar
      [FIX] mail: use base_url helper to be multi website compliant · d82b897e
      Romain Derie authored
      
      When an email is sent and is related to a record, there is a header with a
      button link to access the record.
      
      Before this commit, that button href was always linking to the base_url URL.
      
      That was an issue on multi-website, since we need to use the website url and
      not the base_url if the record is related to a website.
      That's the case for a SO eg, after checkout you receive a confirmation email.
      In a multi-website environment, we need to access the record website.
      
      To do so, a previous imp/fix was done with c1be1993.
      But this occurence still needed to be replaced.
      
      Fixes #34309
      
      closes odoo/odoo#34397
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      d82b897e
  2. Jul 09, 2019
    • Xavier-Do's avatar
      [FIX] core: avoid writting sources during tests · b295723c
      Xavier-Do authored
      
      Future runbot improvement may share sources between build,
      meaning that sources will be readonly to avoid any interaction.
      
      _touch() was supposed to handle ro filesystem but
      f7130556 introduced a new test that was not working
      in this case.
      
      Instead of trying to touch file and pseudomocking the result
      if the filesystem is readonly, this commit add a real patch
      on getmtime.
      
      closes odoo/odoo#34710
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      b295723c
    • Arnold Moyaux's avatar
      [FIX] mrp: wrong value on cost report · cd0b5357
      Arnold Moyaux authored
      
      Follow up to:
      - commit 4cdcab43
      - commit cb4afb26
      - commit fb1839fa
      
      In order to be able to edit a done raw move after the production
      and having a correct cost report with consistent values. The
      simple rule that a done move should have its quantity equals to
      its initial demand. Since report is based on initial demand it
      should follow this rule and it's also a good practice because a
      lot of computation are based on it (easier than quantity done
      because it's already set on the correct quant uom).
      
      opw-2033259
      
      closes odoo/odoo#34695
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      cd0b5357
    • Goffin Simon's avatar
      [FIX] account: Incorrect due date for credit notes · d0f3e896
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Create an invoice I
      - Set the invoice date in the past and  add payment terms
      - Validate I
      - Create refund from I
      
      Bug:
      
      The invoice date is set as today but the due date was set in the past.
      
      opw:2033438
      
      closes odoo/odoo#34692
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      d0f3e896
  3. Jul 04, 2019
    • Martin Trigaux's avatar
      [FIX] tests: properly log errors · 2be2f64a
      Martin Trigaux authored
      
      If a test is failing with assertRecordValues, the comparison and the error
      logging were not computed the same way.
      The _compare_candidate was accessing the record via
      record[field_name]
      which uses the cache
      
      While the _format_message was doing
      records.read(...)
      which queries directly the database.
      
      If the test was failing (correctly) because of a wrong cache invalidation
      (e.g. update the value directly in SQL without invalidating the cache),
      the error message would look like:
      
      AssertionError: Record doesn't match expected values at index 0.
      Current values:
      {'id': 42, 'name': 'Foo'}
      Expected values:
      {'name': 'Foo'}
      
      closes odoo/odoo#34589
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      2be2f64a
  4. Jul 10, 2019
  5. Jul 09, 2019
    • Julien Castiaux's avatar
      [FIX] web: prevent db_manager modal close on empty pwd · 5038f777
      Julien Castiaux authored
      
      Go to the database manager, configure a password either via the
      interface either via the `admin_passwd` `.odoorc` config file. Click on
      the backup menu, let the `password` field empty and submit the form. The
      modal is closed without any warning and no query is sent.
      
      The problem is that even if the field is marked as `required`, there is
      a event listener that catch the `onsubmit` event and close the modal
      even if it is not valid.
      
      opw-2031461
      
      closes odoo/odoo#34669
      
      Signed-off-by: default avatarJulien Castiaux <Julien00859@users.noreply.github.com>
      5038f777
    • Julien Castiaux's avatar
      [FIX] mass_mailing: company logo on unsubscribe url · fa58a842
      Julien Castiaux authored
      
      Setup a multi-company account and multiple website (one for each
      company), create a mail campaign from a different company than the
      superuser, send the emails and unsubscribe, the company logo is the logo
      of the company the superuser is in instead of the logo of the company
      sending the email.
      
      opw-2026528
      
      closes odoo/odoo#34701
      
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      fa58a842
    • Xavier Morel's avatar
      [ADD] core: support for parent.xxx in modifiers of o2m sub-fields · 3e63d8ef
      Xavier Morel authored
      
      closes odoo/odoo#34699
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      3e63d8ef
    • Richard Mathot's avatar
      [FIX] models: avoid Unicode error when translating that error message · 0ec0a4a3
      Richard Mathot authored
      
      The patch fa492d87 has been backported
      from Odoo 12.0, that runs on Python 3.
      
      The string '\n\n({} {}, {} {})' to be formatted is a byte-string in
      Python 2, while the return value of _() is always a unicode-string.
      
      As format() is (too?) nice, it attempts to convert the unicode-strings
      into ascii in order to inject them in the format pattern.
      With some languages that are written in ascii, this works -- by chance.
      When you use non-ascii languages like Japanese, it fails.
      
      We then fix that issue by using unicode-strings in the formatting
      pattern.
      
      #OneCharacterPatch B-)
      
      opw-2032016
      
      -----------------------------
      
      For full technical understanding:
      
      Python 2.7.16 (default, Mar 11 2019, 18:59:25)
      [GCC 8.2.1 20181127] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> '{}'.format('test')
      'test'
      >>> '{}'.format(u'test')
      'test'
      >>> '{}'.format(u'エ')
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      UnicodeEncodeError: 'ascii' codec can't encode character u'\u30a8' in position 0: ordinal not in range(128)
      >>> u'{}'.format(u'エ')
      u'\u30a8'
      
      closes odoo/odoo#34698
      
      Signed-off-by: default avatarRichard Mathot (rim) <rim@openerp.com>
      0ec0a4a3
  6. Jul 08, 2019
    • Goffin Simon's avatar
      [FIX] purchase: purchase VATs in a multi-company · 88a12afd
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Create two companies C1 and C2 where C2 is the child of C1
      - Create two purchase taxes T1 and T2 where T1 is in C1 and C2 is in T2
      - Create a prodcuct P with T1 and T2 as supplier taxes
      - Be in C1 as current company
      - Create a RFQ and add P
      
      Bug:
      
      T1 and T2 were set on the order line of P instead of T1
      
      PS: This fix is insired from product_id_change in model sale.order.line
      
      opw:2032113
      
      closes odoo/odoo#34658
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      88a12afd
  7. Jul 09, 2019
    • Nans Lefebvre's avatar
      [FIX] sale_timesheet: let employees officers/project users access private tasks · a3e504ef
      Nans Lefebvre authored
      
      Have a user U that is Project User, Timesheets User, Employeed Officer.
      Give him access to a private task T (by adding U as a follower of T)
      on private project P.
      Because of Employeed Officer rights, view_task_form2_inherited is rendered.
      This shows field is_project_map_empty, which computation depends on project_id.
      If U does not have access to P, then this triggers an access error, so the Task
      cannot be displayed.
      
      It is in general a legitimate configuration to allow U to interact with T
      without being given full access to P, since it works in all cases but the rights
      described above.
      Since the computation of is_project_map_empty is the only blocking point,
      we put it in sudo.
      
      opw 2031124
      
      closes odoo/odoo#34676
      
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      a3e504ef
  8. Jul 08, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] account: vendor display name multicompany · 674ee035
      Lucas Perais (lpe) authored
      
      In multicompany mode,
      /!\ Adress book sharing should be deactivated
      
      User A in company A creates a vendor bill without a partner
      
      User B in company observes the list. The new bill is present
      
      User A changes companies and goes to company B
      User B doesn't have access to company B
      
      User B reloads the list
      
      Before this commit, there was an access right error on User B side because the partner associated
      with User A changed company, and is now unreadable from User B perspective
      
      After this commit, there is no crash and we have the string: Created By User A in the list
      in place of the vendor display name
      
      OPW 2028451
      
      closes odoo/odoo#34668
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      674ee035
  9. Jul 09, 2019
    • Jairo Llopis's avatar
      [FIX] mass_mailing: Do not alter method signature · fb95cf7b
      Jairo Llopis authored
      
      Before this patch, this method was altering the signature of its parent method, moving the position of `failure_type` to 1 and making the other 2 arguments kw-only.
      
      It seems this accidentally didn't break anything because all calls happened to be done in kwarg mode. However, it's very possible that a downstream module that is not based on `mass_mailing` and makes positional calls gets broken when `mass_mailing` is installed.
      
      The fix is to respect original method signature.
      
      closes odoo/odoo#34648
      
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      fb95cf7b
  10. Jul 08, 2019
  11. Jul 05, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] account: auto reconcile model with tax · a0fa785e
      Lucas Perais (lpe) authored
      
      Set an automatic reconciliation model with a tax
      Create a bank statement on which one line will be caught by that model
      
      Click on reconcile to get to the reconciliation widget
      Observe the account move lines creates
      
      Before this commit, the move line representing the tax amount
      (and in the account for taxes) did not have a tax_line_id, which is
      a reference to the tax that made the line exist
      This messed up tax reports
      
      After this commit, the move line of the tax has a reference
      to the tax it originated from
      The tax reports are correct
      
      OPW 2006826
      
      closes odoo/odoo#34627
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      a0fa785e
  12. Jul 07, 2019
  13. Jul 05, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] account: introduce a form view for account.move.line for mobile · ccb8896f
      Lucas Perais (lpe) authored
      
      On a small display, go to accounting > journal entries > create
      In the (now kanban) list of account move lines, click ADD
      Then, try to choose an account
      
      Before this commit:
      The list of accounts was empty.
      This was because the form view spawned was the automatic generic one
      The generated view did not have thr necessary structure to get fields' value
      from the parent form view.
      In this case, the domain of the name_search for account.account was wrong
      
      After this commit:
      The flow works on mobile as on desktop. The form view's arch is a 1 to 1
      copy of the list view in terms of fields and their definition
      
      OPW 2030837
      
      closes odoo/odoo#34601
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      ccb8896f
    • Xavier Morel's avatar
      [IMP] base: better and less conflicting version of e210faa6 · 7b33689b
      Xavier Morel authored
      
      Backport somewhat improved version of this fix (we don't need to check
      for the existing extension since we're not doing anything if there is
      an extension at all) merged into later branches, to avoid forward-port
      conflicts.
      
      closes odoo/odoo#34509
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      7b33689b
  14. Jul 04, 2019
  15. Jul 03, 2019
Loading