Skip to content

[16.0] purchase_sale_stock_inter_company : unable to validate inter company delivery with Lots/Serial numbers #841

@metaminux

Description

@metaminux

Module

purchase_sale_stock_inter_company

Describe the bug

When using Sale from purchase, if delivery is using Lots/Serial numbers (products tracked by Lots or Unique Serial Number), reservations in the "customer" company are impossible, asking to provide a Lot/Serial number.

To Reproduce

16.0:

Steps to reproduce the behavior:

  1. In a runboat, install purchase_sale_stock_inter_company
  2. Configure My Company (Chicago)
    • Sale from purchase = True
    • Warehouse = Chicago 1
    • Sale user = Marc Demo
    • Sale Orders Auto Validation = True
  3. Configure My Company (San Francisco)
    • Sale from purchase = True
    • Warehouse = Your Company
    • Sale user = Marc Demo
    • Sale Orders Auto Validation = True
  4. Create product "Product with SN" :
    • Type = Storable product
    • Tracking = By Unique Serial Number (or By Lots)
  5. Switch to My company (Chicago)
  6. Create a Purchase Order
    • Vendor = My Company (San Francisco)
    • Add line :
      • Product = Product with SN
      • Qty = 1.0
      • Unit price = 100.0
  7. Confirm order
  8. Switch to My company (San Francisco)
  9. Open contact My company (Chicago)
  10. Click on Sales button
  11. Open the newly created one (with Product with SN)
  12. Click on Delivery button
  • product is not available
  1. From the Operations tab, click on Product with SN and click Update Quantity
  • Click New and create new serial number SN001 and counted quantity = 1.0
  • Click Apply
  1. Go back to delivery picking (product is now available)
  • Click on Check availability
  • Click on Validate (and confirm other actions : quantity done, SMS, etc.)

Expected behavior
In both companies, we should have the product received / delivered with SN001 as serial number

Instead, we have an error message :

User Error

You need to supply a Lot/Serial Number for product: 
 - Product with SN

The problem here is serial number SN001 doesn't exist in My company (Chicago) and can't be created nor selected to validate the incoming shipment (Receipts)

Additional context

I'll propose a PR with a test confirming this issue and a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions