Draft
Conversation
ntsirintanis
commented
Aug 21, 2024
| domain="[('company_id', '=', company_id)]" | ||
| /> | ||
| </xpath> | ||
| <xpath expr="//div[@id='inter_company_so_from_po']" position='before'> |
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
Author
|
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.
ntsirintanis
commented
Aug 29, 2024
| "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, |
Author
There was a problem hiding this comment.
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
ntsirintanis
commented
Aug 29, 2024
| 3, | ||
| "The quantity should decrease as it was in the purchase order", | ||
| ) | ||
| self.assertEqual( |
Author
There was a problem hiding this comment.
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
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
migrate
OCA#507
OCA#523
OCA#541
OCA#559
OCA#560
OCA#596
OCA#600
OCA#656
to 15.0