Skip to content
Snippets Groups Projects
  1. Aug 01, 2019
    • Robot Odoo's avatar
      [MERGE] base: remove field source of ir.translation · ed7b53bb
      Robot Odoo authored
      Instead, make sure the field src is always up to date
      
      Change a bit the behaviour of `_write` to always try to update potential
      translations when in monolanguage (was only done in multi-language if different
      than en_US) and always create translations when writing on a translatable field
      when in multi-language (was skipped in en_US)
      
      Add tests
      
      Task-id: 2031752
      Pad: https://pad.odoo.com/p/r.dbf835d0aae979d858f73446dcbfb1df
      
      
      
      closes odoo/odoo#34598
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      ed7b53bb
    • Martin Trigaux's avatar
      [FIX] base: single lang behaviour · 18d9c2ca
      Martin Trigaux authored
      If a db is in single lang (en_US or not) but still has translations, the
      translation should be updated in addition to updating the referenced record
      Add tests to formalise the expected behaviour:
      
      If one language only (en_US or not), when writing on a translatable field:
      - record field should updated
      - value of potential existing en_US translation should be updated
      - src of potential existing translations should be updated
      - no new translation should be created
      
      If en_US and fr_FR, when writing on a translatable field in en_US:
      - record field should updated
      - value of potential existing en_US translation should be updated
      - src of potential existing translations should be updated
      - new en_US translation should be created if was not present
      
      If en_US and fr_FR, when writing on a translatable field in fr_FR:
      - record field should not be updated
      - value of potential existing fr_FR translation should be updated
      - src of potential existing translations should not be updated
      - new fr_FR translation should be created if was not present
      
      Adapt test_new_api test
      get_installed is ormcached, just putting active = True is not enough
      18d9c2ca
    • Martin Trigaux's avatar
      [REF] base: remove field source of ir.translation · 66ef641f
      Martin Trigaux authored
      Instead, make sure the field src is always up to date
      Add tests
      
      Changes in _write:
      - Replace _set_ids (to be deprecated) call by _upsert_translations as it works
        in batch
      - Call _upsert_translations for any language, including en_US
        In case an English translation already existed for a record, only the master
        value (on the reference record) was updated but the user kept seeing the
        translation value (was revealed 73a7534b).
      - Read src_trans without language
        Similar as above, if an English translation already existed, the translation
        was used for the result of the read and not the new value that has just been
        inserted into the database
      - Add _set_source method
        When updating a master record of a translated field, the src field must be
        updated, including in different languages.
        Before it was ok that the src field was out of date as the source was computed
      
      Changes in copy_translation:
      - set src as the new value without lang
        update the comment to reflect reality since 489494e7
        src will contain the English version if no changes were made and it will
        contain the modified value if copy was overriden
      
      Changes in upsert_translations:
      - Do not force a module, comment, state
        Only src, res_id, name, value and lang must be given. Optional values will no
        longer be set to null if not given
      66ef641f
  2. Jul 29, 2019
  3. Jul 31, 2019
    • Simon Lejeune's avatar
      [REF] stock: tests common · 5c8342f9
      Simon Lejeune authored
      
      This class referenced demo data but even if they weren't installed, the
      tests were passing. Remove the definition and usages.
      
      closes odoo/odoo#35343
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      5c8342f9
    • wan's avatar
      [FIX] point_of_sale: anglosaxon prices werent correctly calcuated · 13a535a0
      wan authored
      Reproduce:
      1. I create a product with fifo and real_time valuation (make sure the invoicing policy is 'delivered' and make it available in pos).
      2. set the cost of the product to be 5.0 and sale price to be 10.0.
      3. I update its inventory and set 5 items. -> total valuation of 25.
      4. I change the cost of the product to 1.0.
      5. I update again the quantity to 10, making the valuation of the product to 30.0.
      6. I configure point of sale to allow invoicing.
      7. Open a pos session then sell 7 items of the product (invoice the order).
      8. Since the product is fifo, this means that the cost of goods sold is 5 * 5.0 + 2 * 1.0 = 27.0.
      9. The correct expense account line should have balance of 27.0.
      10. The correct output account line should have balance of -27.0
      
      However, instead of 27.0 as stock valuation amount, the value in the
      pos.order invoice is currently 7 * 2.0 = 14 -- and this is wrong. It is
      not taking into account the value of the previous stock
      
      Solution:
      Missing refactoring from https://github.com/odoo/odoo/commit/14812f41710282f9923078f6764323086500ae85
      
      
      
      closes odoo/odoo#35335
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      13a535a0
  4. Jul 30, 2019
    • Xavier-Do's avatar
      [FIX] core: log error on addSubTest · 22930162
      Xavier-Do authored
      
      Since #34996, in some case, the error detail was not logged keeping
      only the final summary "x errors, x failures" when running TestSuite.
      
      Making fail test test_cache_invalidation for instance won't show
      a detailed message when breaking test_01_project_tour will.
      This issue occurs when using subtest, like with assertQueryCount,
      @users decorator, test_all_l10n, and test_youtube_urls.
      
      Since Testresult addSubTest append directly to error and failures
      instead of calling addError and addFailure, we need to ovewrite
      addSubtest too.
      
      closes odoo/odoo#35270
      
      Signed-off-by: default avatarDenis Ledoux <beledouxdenis@users.noreply.github.com>
      22930162
  5. Jul 31, 2019
    • Nathan de Pryck's avatar
      [IMP] iap: multi-company for iap account · 4f33ae16
      Nathan de Pryck authored
      
      The "company_id" fields for the iap account has
      been changed by the "company_ids" fields to allow
      the use of an iap account with multiple company.
      
      closes odoo/odoo#35093
      
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      4f33ae16
    • svs-odoo's avatar
      [IMP] mrp: can delete active MO · b499c330
      svs-odoo authored
      
      Before this commit, you can delete only canceled MO.
      Now, if you want to delete a non-canceled MO, it will try to cancel it
      then to unlink it.
      
      Task #1969034
      
      closes odoo/odoo#34026
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      b499c330
    • Arnold Moyaux's avatar
      [FIX] mrp: log activity on parent MO · 3d4c0f92
      Arnold Moyaux authored
      Usecase:
      - Set table top as manufacture and MTO
      - Create a MO for table(MTO)
      - Confirm the MO
      - Cancel the MO
      
      The activity with the exception is not logged on the child MO
      
      It happens because the _get_upstream_documents_and_responsible for move
      linked to a MO is based on the created_production_id field. However it
      is only set on the move that created the move_finished_ids for the new
      MO. In the case of a MO that directly create a child MO the chain is:
      
      MO -> move_raw_ids -> move_finished_ids -> MO2
      The log_activity on cancel is based on the move_raw_ids and their
      move_orig_ids in the previous case it's the move_finished_ids for MO2.
      However the move_finished_ids for MO2 is directly link to the child MO
      and the created_production_id is set on the move_raw_ids for MO parent.
      
      Compare to PO, we could directly base the parent document on production_id
      since the move_finished_ids are directly created.
      3d4c0f92
    • svs-odoo's avatar
      [IMP] mrp: can cancel MO in more cases · c76fcd87
      svs-odoo authored
      
      Manufacturing Order can now be cancelled even if some move lines or Work
      Orders are done (in this case, a wizard ask confirmation to the user).
      
      Task #1969034
      
      Co-authored-by: default avatarArnold Moyaux <arm@odoo.com>
      c76fcd87
    • pha-odoo's avatar
      [FIX] iot: bluetooth work with serial · 28c2e642
      pha-odoo authored
      
      Using path such as '/dev/ttyUSB0' to connect to a serial port
      makes it impossible to use the bluetooth.
      
      We now use the locations in '/dev/serial/by-path' to connect to serial port,
      which does not affect bluetooth connections
      
      closes odoo/odoo#35302
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      28c2e642
    • Pierre Rousseau's avatar
      [IMP] crm_iap_lead: improve credits tooltip · 0e6e80ca
      Pierre Rousseau authored
      
      Before this commit, the tooltip message for the credits lacks clarity when making a request for companies and contacts. The sentence 'making a total of X credits for this request' was only the total of the credits for the contacts, without the credits for the companies.
      Now, the tooltip is clearer, the total takes into account the credits for the companies and the contacts.
      
      Task-ID 2036946
      
      closes odoo/odoo#35049
      
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      0e6e80ca
  6. Jul 29, 2019
  7. Jul 31, 2019
    • Patrick Hoste's avatar
      [IMP] eLearning: adds course and certification stat button on partner · 81c7afb8
      Patrick Hoste authored
      
      Adds two stats button on res.partner form view :
      - The first one will show all the courses that the partner is following.
      - The second one will show all the certifications the partner has passed.
      When the partner is a company :
      - All the courses followed by all the partners are shown without duplicate.
      - All the certifications passed by all the partners are shown.
      
      PR : #34908
      Task ID : 2034097
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      81c7afb8
    • qmo-odoo's avatar
      [REF] sales_team: Clean _get_default_team · d3291207
      qmo-odoo authored
      
      This commit changes the method _get_default_team_id so that it removes
      the xmlid reference to the default team. Instead, we will now use
      the team sequence (with default team's sequence being set as 1)
      and falling back to the next team with the highest sequence if the
      default team got deleted.
      
      Therefore, teams will now be ordered by sequence instead of name,
      allowing the users to reorder their teams as they see fit
      
      This commit also removes useless sudo when searching teams
      
      Task: #1962182
      PR: #32372
      
      wip
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      d3291207
  8. Jul 30, 2019
    • qmo-odoo's avatar
      [IMP] crm,sale,*: Improve UX · 0d2be383
      qmo-odoo authored
      This commit improves the ux in CRM by changing a few things:
        - Restore the use_leads and use_quotations fields
          along with their features as they were in 12.0.
        - Hide the email alias if use_upportunities and use_leads
          are unchecked.
        - Show a link to the general settings instead of the alias_domain
          if no alias_domain has been configured.
        - fixes the "unassigned lead(s)" link so that
          it redirects the user to the actually unassigned leads
      
      Task: #1962182
      PR: #32372
      0d2be383
  9. Jul 31, 2019
  10. Jul 30, 2019
Loading