Skip to content
Snippets Groups Projects
  1. Apr 17, 2018
  2. Apr 16, 2018
  3. Apr 17, 2018
  4. Apr 16, 2018
    • Christophe Simonis's avatar
      aab09088
    • Christophe Simonis's avatar
      c92d43c0
    • Kirti Choudhary's avatar
      [FIX] sale: income account in invoice with down payments · aaadfd7d
      Kirti Choudhary authored
      When creating an invoice with 'Down payment' option for an SO, it should
      first consider income account of the 'Deposit Product'. if it does not
      have one then it should consider that product category's income account.
      
      Fixes #23100
      Task# 1819531
      aaadfd7d
    • Simon Lejeune's avatar
      [REM] stock_account: valuation stat button · b8133aa6
      Simon Lejeune authored
      Remove the valuation stat button as we say that from now on, to
      understand the current value of a product, you should go through the
      valuation ation and its stat button.
      b8133aa6
    • Simon Lejeune's avatar
      [REF] stock_account: valuation at date wizard · 352875a5
      Simon Lejeune authored
      We add the valuation at date wizard by re-using the quantity at date
      wizard and adding a context key to separate the both.
      
      The same view/action is used when openning the current or at date
      valuation, only the `to_date` context key is changed.
      352875a5
    • Simon Lejeune's avatar
      [REF] stock_account: support valuation at date · 3a828117
      Simon Lejeune authored
      For the standard and average cost method, we use `qty_available` at date
      and the `product.price.history` table.
      
      For FIFO, the normal way would have been to get the `qty_available` at
      date and value this quantity with the more recent IN moves at this date.
      
      But there's two main obstacles preventing to use this solution:
      - when editing a done move to change the quantity, the change is
        reflected at the date, the `qty_available` at date will be incremented
      - in the same usecase, the remaining_qty and remaining_value is
        incremented in place, which mean that even if the layer was already
        consumed, it's now appearing again at the bottom of the fifo layer
      
      Fixing this issue by adding a stock move at the date of today instead of
      editing in place in v11 and adding a proper "cost layer" model in master
      was deemed too complex as well as unnecessary by our bosses
      
      So we now say we continue to update in place, and when looking at the
      quantity at date
      - if periodic, we sum the value of the move since the beginning of times
      - if perpetual, we sum the balance of the account move lines since the
        beginning of times. Also, in this case, the quantity at date is
        computed across account move lines too, via the "quantity" field on
        aml.
      
      This commit adds three non stored computed field:
      - qty_at_date: will be computed across stock moves if fifo periodic and
        across account move line if fifo perpetual to reflect the design
        choice: if periodic, we *really* edit in the past ; if perpetual, no,
        the change is done at today's date
      - stock_fifo_real_time_aml_ids: the used aml to compute qty_at_date
      - stock_fifo_manual_move_ids: the used move to compute qty_at_date
      3a828117
    • Simon Lejeune's avatar
      [FIX] stock_account: stock_value and depends · 0eec54ca
      Simon Lejeune authored
      stock value should be recomputed when the standard price change
      
      it is not optimal since it is updated in fifo after a delivery but
      needed when working with standard cost method
      
      remaining_value should also be part of the depends since the current
      value depends on it
      0eec54ca
    • Simon Lejeune's avatar
      [REF] stock_account, stock_landed_costs: `quantity` field on account.move.line · 348c371e
      Simon Lejeune authored
      Properly set the quantity field on the account move lines when
      exceptions happen (unlock and edit: only the difference is set as
      quantity, negative stock and vacuum: no quantity should be set).
      
      When applying a landed cost, no quantty should be set neither.
      
      This is a preliminary work to bring the valuation at date wizard to v11.
      348c371e
    • Simon Lejeune's avatar
      [REF] stock_account: move's value and exceptions · 704f5c9e
      Simon Lejeune authored
      Update the value on the moves when exceptions happen (unlock and edit,
      negative stock).
      
      This is a preliminary work to bring the valuation at date wizard to v11.
      
      We also update the value on moves in the standard cost method to stay
      consistent.
      
      - `_run_fifo` now returns the used value in the negative stock case
      - we simplify the `_fifo_vacuum` method so that the `remaining_value`
        always represent the not yet compensated value
      - we adapt the tests to reflect theses changes ; the value is not the
        initial valued amount but is updated upon exceptions
      704f5c9e
    • Christophe Simonis's avatar
      752dcc76
    • Christophe Simonis's avatar
      [IMP] website: handle geoip2 databases · 264398de
      Christophe Simonis authored
      Since April 1, 2018, free versions of GeoLite Legac y databases are no
      longer updated and free downloads not available [1].
      
      [1] https://support.maxmind.com/geolite-legacy-discontinuation-notice/
      264398de
    • Christophe Simonis's avatar
      412501a5
    • Nicolas Martinelli's avatar
      [FIX] account: default taxes · 3efa5b01
      Nicolas Martinelli authored
      Make sure the variable is casted to an integer when getting taxes.
      
      opw-1830862
      3efa5b01
    • Fabien Pinckaers's avatar
      [IMP] project: automated mail, improve subject (as it's sent 3 days later,... · 8f8fc59b
      Fabien Pinckaers authored
      [IMP] project: automated mail, improve subject (as it's sent 3 days later, 'Odoo is up and running' feels wrong
      8f8fc59b
    • Kiril Vangelovski's avatar
      [FIX] base: reason json payload using get_data · ff07f078
      Kiril Vangelovski authored
      Replace `httprequest.stream.read()` by `httprequest.get_data()` so the
      payload content remains available: get_data stores the request body (by
      default) so it remains available for alternative processing or checks
      (MAC checks for webhook validations for instance). With `stream.read()`,
      once the data is read if it's not stored separately it is lost.
      ff07f078
Loading