-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
purchase_sale_*_company: to 15.0 #3
base: 15.0
Are you sure you want to change the base?
Conversation
@@ -16,6 +16,14 @@ | |||
domain="[('company_id', '=', company_id)]" | |||
/> | |||
</xpath> | |||
<xpath expr="//div[@id='inter_company_so_from_po']" position='before'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after
dd8a282
to
92b3d53
Compare
…roducts Imagine you have a customization that enables the split of a stock move into several moves (distributed in several pickings). Thus, we need to handle this case.
d595cb6
to
1ff65eb
Compare
1ff65eb
to
9f8e7a0
Compare
Test error, which I cannot reproduce locally:
@thomaspaulb maybe you can assist here? |
…can have more than one record
… self can have more than one record, to v15
Previously an intercompany picking with tracked products would simply throw an error. With this fix, the method searches for a lot in the destination company that matches the one in the source company (same name and same product). A new lot is created by duplicating the original, if none is found.
…pdates When the purchase user updates the PO after the SO is generated and always if both are confirmed and unlocked, we sync the new lines to update the demand. TT46773
… intercompany transfer
A number of things can go wrong in trying to confirm the PO picking when the SO picking is confirmed. Instead of raising an error and thereby blocking the confirm of the SO picking, provide an option by which the exception can be caught. The SO picking will still be confirmed, but an activity will be posted for someone to deal with the PO picking manually.
"product_id": self.stockable_product_serial.id, | ||
"product_uom_id": self.stockable_product_serial.uom_id.id, | ||
"qty_done": 1, | ||
"lot_id": self.serial_3.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2024-08-29 13:34:38,042 2528418 ERROR skata odoo.addons.purchase_sale_stock_inter_company.tests.test_inter_company_purchase_sale_stock: ERROR: TestPurchaseSaleStockInterCompany.test_sync_picking_lot
Traceback (most recent call last):
File "/home/ntsirintanis/projects/callista/auto/addons/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py", line 247, in test_sync_picking_lot
so_picking_id.button_validate()
File "/home/ntsirintanis/projects/callista/auto/addons/purchase_sale_stock_inter_company/models/stock_picking.py", line 143, in button_validate
record._sync_receipt_with_delivery(
File "/home/ntsirintanis/projects/callista/auto/addons/purchase_sale_stock_inter_company/models/stock_picking.py", line 200, in _sync_receipt_with_delivery
dest_picking.sudo().with_context(
File "/home/ntsirintanis/projects/callista/auto/addons/purchase_sale_stock_inter_company/models/stock_picking.py", line 47, in _action_done
return super()._action_done()
File "/home/ntsirintanis/projects/callista/auto/addons/sale_stock/models/stock.py", line 84, in _action_done
res = super()._action_done()
File "/home/ntsirintanis/projects/callista/auto/addons/stock/models/stock_picking.py", line 840, in _action_done
todo_moves._action_done(cancel_backorder=self.env.context.get('cancel_backorder'))
File "/home/ntsirintanis/projects/callista/auto/addons/stock_account/models/stock_move.py", line 271, in _action_done
res = super(StockMove, self)._action_done(cancel_backorder=cancel_backorder)
File "/home/ntsirintanis/projects/callista/auto/addons/stock/models/stock_move.py", line 1762, in _action_done
moves_todo.mapped('move_line_ids').sorted()._action_done()
File "/home/ntsirintanis/projects/callista/auto/addons/stock/models/stock_move_line.py", line 605, in _action_done
Quant._update_available_quantity(ml.product_id, ml.location_dest_id, quantity, lot_id=ml.lot_id, package_id=ml.result_package_id, owner_id=ml.owner_id, in_date=in_date)
File "/home/ntsirintanis/projects/callista/auto/addons/stock/models/stock_quant.py", line 687, in _update_available_quantity
quant.write({
File "/home/ntsirintanis/projects/callista/auto/addons/stock/models/stock_quant.py", line 268, in write
return super(StockQuant, self).write(vals)
File "/home/ntsirintanis/projects/callista/custom/src/odoo/odoo/models.py", line 3905, in write
real_recs._validate_fields(vals, inverse_fields)
File "/home/ntsirintanis/projects/callista/custom/src/odoo/odoo/models.py", line 1378, in _validate_fields
check(self)
File "/home/ntsirintanis/projects/callista/auto/addons/stock/models/stock_quant.py", line 463, in check_quantity
raise ValidationError(_('The serial number has already been assigned: \n Product: %s, Serial Number: %s') % (product.display_name, lot.name))
odoo.exceptions.ValidationError: The serial number has already been assigned:
Product: Stockable Product Tracked by Serial, Serial Number: 333
3, | ||
"The quantity should decrease as it was in the purchase order", | ||
) | ||
self.assertEqual( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2024-08-29 13:34:41,471 2528418 ERROR skata odoo.addons.purchase_sale_stock_inter_company.tests.test_inter_company_purchase_sale_stock: FAIL: TestPurchaseSaleStockInterCompany.test_update_open_sale_order
Traceback (most recent call last):
File "/home/ntsirintanis/projects/callista/auto/addons/purchase_sale_stock_inter_company/tests/test_inter_company_purchase_sale_stock.py", line 336, in test_update_open_sale_order
self.assertEqual(
AssertionError: 3.0 != 8 : The quantity should remain as it was as it can't be decreased from the SO
migrate
OCA#507
OCA#523
OCA#541
OCA#559
OCA#560
OCA#596
OCA#600
OCA#656
to 15.0