Help

0

How to make Inter-Company transfer with LOT numbers?

Avatar
Enes Canıdemir

Dear all,

I am using Odoo V13.0+e (Enterprise Edition)

In stock module;

I want to transfer my products from Company A to Company B with the Lot/Serial Numbers.

To transfer my products i am using "Virtual Locations / Inter Company Transit" location.

To do that;

Firstly i am transferring my products from Company A / Stock to this Virtual Inter Company Transit location.
And using a custom Route (Push To);

"When products arrive in Virtual Locations/Inter Company Transit, Receipts are created to send them in Company B/Input"

I can easily transfer any products to Company B input location.

But if a product has a lot or serial number then the problem occurs.

The Error is:

Something went wrong!
Some records are incompatible with the company of the Product Moves (Stock Move Line).
Incompatibilities:
Fields: lot_id
Record ids: 913

I think, the problem is, when you create a lot/serial number for a product, you need to select the company. So the lot number is assigned to that company. When i want to transfer this product to a different company, its automatically not recognised because of the lot/serial number. So i need to re-input (create) all the lot numbers when i am receiving these products. 

Is there a way to make this transfer without manually creating the lot numbers?

Thanks in advance.

2 Comments
Avatar
Discard
Avatar
Enes Canıdemir
-

Thanks for your reply

I tried but it did not work

Do you have any other solution?

Thanks

Avatar
Ray Carnes (ray)
-

Can you expand on "it did not work"? What happened? Did you get an error? When saving the Server Action? When entering the serial numbers for the first company? When receiving in the second Company? Pretend we don't know what you know (hint: we don't). :)

4 Answers
0
Best Answer

I ended up creating a Server Action to use the name of the reserved Lot and move it to the Lot Name field so that the Receipt would create the Lot in the second Company:


Note:  I did this in a demo, not an implementation, so didn't check how well this approach would work in a production system or it if works well for all Use Cases.  "Show Detailed Operations" was checked ON for the Operation Type during this demo.


for line in record.move_line_ids_without_package:
  if line.lot_id:
    line['lot_name'] = line.lot_id.sudo().name
    line['lot_id'] = False
    line['qty_done'] = line.product_uom_qty
  line['qty_done'] = line.product_uom_qty
Avatar
Discard
0
Avatar
Enes Canıdemir
Best Answer

I created the server action with no problem.

When i click this action it only refreshes  the table but nothing happens

I created a test database, you can login the database.

Thanks for your help, I appreciate it.

Database: testing3.odoo.com
Email: test@test.test
Password: test

Avatar
Discard