Skip to content
Snippets Groups Projects
  • Mathieu Walravens's avatar
    30de83a5
    [FIX] stock_account: correct accounts for dropship return · 30de83a5
    Mathieu Walravens authored
    
    Before this commit:
    When returning a dropshipping, the valuation layers created do not have
    the correct accounts on it:
     - Valuation -> Input   for the first SVL
     - Output -> Valuation  for the second SVL
    
    After this commit:
    For a dropshipped move, valuation layers have the following chain
    of accounts:
     - Input -> Valuation   for the first SVL
     - Valuation -> Output  for the second SVL
    Therefore, the return should have it reversed:
     - Output -> Valuation  for the first SVL
     - Valuation -> Input   for the second SVL
    
    Steps to reproduce:
    1. Create a dropship product with automated inventory valuation
    2. Create a Sales Order, go on the PO and confirm it
    3. Set quantities and validate dropshipping
    4. Return delivered product (dropship return)
    
    opw-3391174
    
    closes odoo/odoo#132864
    
    Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
    30de83a5
    History
    [FIX] stock_account: correct accounts for dropship return
    Mathieu Walravens authored
    
    Before this commit:
    When returning a dropshipping, the valuation layers created do not have
    the correct accounts on it:
     - Valuation -> Input   for the first SVL
     - Output -> Valuation  for the second SVL
    
    After this commit:
    For a dropshipped move, valuation layers have the following chain
    of accounts:
     - Input -> Valuation   for the first SVL
     - Valuation -> Output  for the second SVL
    Therefore, the return should have it reversed:
     - Output -> Valuation  for the first SVL
     - Valuation -> Input   for the second SVL
    
    Steps to reproduce:
    1. Create a dropship product with automated inventory valuation
    2. Create a Sales Order, go on the PO and confirm it
    3. Set quantities and validate dropshipping
    4. Return delivered product (dropship return)
    
    opw-3391174
    
    closes odoo/odoo#132864
    
    Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>