-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
[18.0][MIG] stock_picking_batch_extended: Migration to 18.0 #1855
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] stock_picking_batch_extended: Migration to 18.0 #1855
Conversation
- Converts old stock.batch.picking in stock.picking.batch - Restore link in stock.picking - Other needed stuff
…er and activities
* Standard procedure * Fix tests
…or small screens.
… in tree view TT28975
Currently translated at 21.4% (15 of 70 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_batch_extended/it/
Currently translated at 87.1% (61 of 70 strings) Translation: stock-logistics-workflow-15.0/stock-logistics-workflow-15.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-15-0/stock-logistics-workflow-15-0-stock_picking_batch_extended/sl/
…w in batch pickings
… Use _for_xml_id instad of read
…g mode is selected. Don't save last option when batch_by_group is unchecked. TT42965 TT43055
…Picking group [REF] stock_picking_batch_extended: update picking_batch_configuration_settings img configuration
Currently translated at 22.2% (14 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/it/
Currently translated at 100.0% (63 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/it/
Currently translated at 100.0% (63 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/it/
Currently translated at 84.1% (53 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/pt_BR/
Currently translated at 100.0% (63 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/it/
Currently translated at 100.0% (63 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/it/
Currently translated at 100.0% (63 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/pt_BR/
Currently translated at 100.0% (63 of 63 strings) Translation: stock-logistics-workflow-16.0/stock-logistics-workflow-16.0-stock_picking_batch_extended Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_batch_extended/it/
…icking report on "print deliveries" button TT50661
13ea03a
to
3d36345
Compare
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
|
||
def migrate(cr, version): |
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.
This migration script is needed to handle the return to an existent field description_picking
from custom description_warehouse
It was requested in TODO
# TODO: Integrate in existent field | ||
description_warehouse = fields.Text("Warehouse Description", translate=True) |
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.
I suppose description_picking
is the field we want to return to
"product_uom_qty": 1, | ||
"location_id": cls.stock_loc.id, | ||
"location_dest_id": cls.customer_loc.id, | ||
"product_uom_qty": 10, |
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.
I propose to increase the quantity to easily simulate partial and backorder usage behavior
@@ -256,8 +264,7 @@ def test_backorder(self): | |||
self.assertEqual(self.product6, backorder.move_ids[0].product_id) | |||
self.assertEqual(2, backorder.move_ids[0].product_uom_qty) | |||
self.assertEqual(1, len(backorder.move_line_ids)) | |||
self.assertEqual(2, backorder.move_line_ids[0].reserved_uom_qty) | |||
self.assertEqual(0, backorder.move_line_ids[0].qty_done) |
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.
qty_done
is not an attribute of stock.move.line
anymore
|
||
def test_package(self): | ||
warehouse = self.browse_ref("stock.warehouse0") |
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.
This test was failing. I've checked the OCA code doesn't modify the behavior of packaging, so I've rewritten the code with the standard way.
@@ -168,24 +168,3 @@ def action_view_batch_picking(self, batch_pickings): | |||
else: | |||
action = batch_pickings.get_formview_action() | |||
return action | |||
|
|||
|
|||
class StockBatchPickingCreatorGroupField(models.TransientModel): |
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.
Following conventions I've moved this class definition to a separate file.
@@ -12,9 +12,3 @@ class ResConfigSettings(models.TransientModel): | |||
related="company_id.use_oca_batch_validation", | |||
readonly=False, | |||
) | |||
|
|||
|
|||
class Company(models.Model): |
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.
Following conventions I've moved this class definition to a separate file.
/ocabot migration stock_picking_batch_extended |
@@ -0,0 +1,6 @@ | |||
In Inventory / Settings / Batch Picking it is possible to activate or | |||
deactivate which approach for batch handling will be used per company. |
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.
It should be great to describe which one.
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.
Functional validation is OK
IMHO those kind of modules should be avoided. As it is very difficult for users to determine what is the real purpose of it. |
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.
Warf! This module is doing too many different things.
Can you split in several modules? One meaningful group of features per module.
And try to find meaningful module names
class ProductTemplate(models.Model): | ||
_inherit = "product.template" | ||
|
||
description_picking = fields.Text(string="Warehouse Description", translate=True) |
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.
I don't see where this is used. Should be in a separate module
class Company(models.Model): | ||
_inherit = "res.company" | ||
|
||
use_oca_batch_validation = fields.Boolean() |
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.
What is the OCA way? This is not clear, help missing. Rename field
No description provided.