Skip to content
Snippets Groups Projects
  1. Aug 07, 2019
  2. Aug 06, 2019
    • shreya thakrar's avatar
      [IMP] base,l10n_*: Move state from l10n_* to base and remove · 6fc4c534
      shreya thakrar authored
      
      Remove states according to new address format
      
      No need to keep states that's why they have been remove.
      
      From Module:
      Belgium(l10n_be)
      Germany(l10n_de)
      Poland(l10n_pl)
      
      Purpose :
      ========
      Uniformity for define all state in base.
      
      Specification :
      ===========
      Move states from localization to base module
      
      Localization modules:
      China(l10n_cn)
      Costa Rica(l10n_cr)
      Dominican Republic(l10n_do)
      Ethiopia(l10n_et)
      Ireland(l10n_ie)
      Netherlands(l10n_nl)
      Turky(l10n_tr)
      Vietnam(l10n_vn)
      Romania(l10n_ro)
      United Kingdom(l10n_uk)
      
      that it is not a problem to put all these states in base, because the current csv only takes 0.34 s to be loaded
      
      Related to task #1967713
      Closes #32767
      
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      6fc4c534
  3. Aug 07, 2019
  4. Aug 06, 2019
  5. Aug 05, 2019
    • William Henrotin's avatar
      [FIX] stock: unlink scrap on cancel · c361c377
      William Henrotin authored
      from f5e99060, a scrap order was unlink
      when clicking the discard button in the insufficient quantity wizard.
      This lead to a access error when the wizard was closed on the scrap order
      form view. The form view was reloaded on a deleted record.
      
      This commit adds a context key that prevent the unlink if the scrap order
      was validated from the scrap form view
      
      Task : 2043136
      c361c377
  6. Aug 06, 2019
  7. Aug 05, 2019
    • Christophe Simonis's avatar
      [ADD] core: new magical `odoo.upgrades` package · dfc9fe6a
      Christophe Simonis authored
      
      This package point to first package found in `upgrades_paths` or
      fallback to alias of legacy `odoo.addons.base.maintenance.migrations`.
      
      closes odoo/odoo#32650
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      dfc9fe6a
    • Laurent Contzen's avatar
      [IMP] ORM: Add new --upgrades-paths CLI option · bbb1a8f1
      Laurent Contzen authored
      
      This commit adds a new way to use upgrades scripts folders
      whithout needing to symlink them to an hardcoded path.
      
      The folders specified in --upgrades-paths is then being used by
      migration.py to find and execute migrations scripts per module
      specified in the -u CLI option.
      
      The folder needs to have the following structure:
      - <upgrades_paths folder 1>
      	- <module1 name>
      		- <version1>
      			- <script1>
      			- <script2>
      			- ...
      			- <scriptn>
      		- <version2>
      			- <scripts>
      	- <module2 name>
      		- <versions>
      			- <scripts>
      	- ...
      - <upgrades_paths folder 2>
      	- ...
      
      Update odoo/tools/config.py
      
      Co-Authored-By: default avatarOlivier Dony <odony@users.noreply.github.com>
      bbb1a8f1
  8. Aug 02, 2019
    • wan's avatar
      [FIX] point_of_sale: anglo saxon price unit when invoicing before closing the session · 6edb18be
      wan authored
      Task 2041208
      
      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
      
      Followp of https://github.com/odoo/odoo/pull/35335
      
      
      There was missing the part when an invoice is created from the POS
      When the invoice is created from action_pos_order_invoice, it only contains invoice_line_ids. The stock valuation lines are present when the account.move is posted through addons/stock_account/models/account_move.py post method. That method requires _stock_account_get_anglo_saxon_price_unit to give the average unit price if it comes from a pos.order, just like it does when a sale.order.
      
      closes odoo/odoo#35379
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      6edb18be
    • Mathieu Duckerts-Antoine's avatar
      [REF] *: pivot view refactoring · 49a97305
      Mathieu Duckerts-Antoine authored
      
      The main aim of the present refactoring is twofold:
      
      - simplify the code that was largely complexified at the time of the
      introduction of comparisons in the pivot view (Time Ranges menu),
      
      - factorize the method expandHeader and _loadData that were too much complex.
      
      Along the way, the pivot model structure has been simplified
      and many tests have been added.
      Performances in mobile mode have been improved by avoiding
      unecessary operations due to useless column groupbys in that
      mode.
      It should now be easier to understand and modify the pivot view in future.
      
      Co-Authored-By: default avatarAaron Bohy <aab@odoo.com>
      
      closes odoo/odoo#33615
      
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      49a97305
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: mockReadGroup does not mix 'false' and false · 1ef258f6
      Mathieu Duckerts-Antoine authored
      An implicit call to toString was made for the
      groupbys values in the function used to
      group records in _mockReadGroup.
      Consequently, the values false and 'false' were
      mixed and the corresponding records put in the
      same group.
      1ef258f6
    • Mathieu Duckerts-Antoine's avatar
      [IMP] web: add math_utils to core · 5894df57
      Mathieu Duckerts-Antoine authored
      math_utils is a small library that exports two
      functions:
      
          - cartesian: allows to compute the cartesian
                      products of any numbers of arrays
                      while preserving the internal
                      structures of their elements.
          - sections: returns an array with all
                      the initial sections of the
                      array passed as parameter.
      5894df57
  9. Aug 05, 2019
    • Anand Kansagra's avatar
      [IMP] account,stock,base: fix typos · e488f208
      Anand Kansagra authored
      
      And use CamelCase in label
      
      Closes odoo/odoo#29010
      Closes odoo/odoo#29092
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      e488f208
    • Christophe Simonis's avatar
      [IMP] core: remove support of `oldname` attribute · e8a3f1a0
      Christophe Simonis authored
      
      This attribute is misleading as it is insufficient to correctly upgrade
      the database. It only renames the column in the database, but other
      operations are needed, like updating the corresponding `ir.model.fields`
      record (and its xmlid). The default values and the translations are also
      lost during the upgrade.
      
      Moreover, this feature was misused. It was:
      - left on fields during multiple versions.
      - used on reports (SQL views). This would be ok if the feature was
      complete, but, as is, it was useless.
      - kept unchanged after a second renaming of the field (which can happen
      versions later the first rename).
      - used, even when the meaning of the field changed. i.e. the field
      `archived` has been renamed to the classic `active`, but the value
      in the database should be switched.
      
      closes odoo/odoo#35439
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      e8a3f1a0
Loading