-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
[10.0] [MIG] stock_picking_variant_mgmt: Migration to 10.0 #84
[10.0] [MIG] stock_picking_variant_mgmt: Migration to 10.0 #84
Conversation
================================================= Handle easily multiple variants on Stock Pickings ================================================= This module allows to add/modify of all the variants of a product in a direct screen without the need of handling them one by one. It also adds a convenient way of handling the transfer of the products in a 2D matrix with all the values of the first attribute in columns, and the rest of the combinations in rows. Configuration ============= * Configure your user to have any permission from "Inventory" group. * Create a product with 2 attributes and several values. Usage ===== * Go to Inventory > Dashboard. * Create a new picking from one of the existing picking types. * Press "Add variants" button located in the upper right corner of the "Initial Demand" tab. * A new screen will appear allowing you to select the products that have variants. * Once you select the product, a 2D matrix will appear with the first attribute values as columns and the second one (if any) as rows. * If there are already order lines for the product variants, the current quantity will be pre-filled in the matrix. * Change the quantities for the variant you want and click on "Transfer to picking" * Move lines for the variants will be created/removed to comply with the input you have done. As extra feature for saving steps, there's also a button on each existing line that corresponds to a variant that opens the dialog directly with the product selected. You are also able to manage variants on 1 dimension in the transfer: * Go to the "Operations" page. * Press on "Manage Variants Transfer" button in the upper right corner of the tab. * Change the quantities to transfer. * Click on "Transfer to picking" button. Known issues / Roadmap ====================== * The inline button for modifying quantities for an existing line won't work correctly until these 2 PRs are merged in Odoo: * odoo/odoo#13557 * odoo/odoo#13635 The patches are already integrated on OCB. * Make this work with product with more than 1 attribute.
5f3526a
to
152fd1a
Compare
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.
Code LGTM.
Testing in runbot shows intermittent error when click in new matrix button of picking line:
Uncaught TypeError: Cannot read property 'type' of undefined
http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/474-bfd16b8/web.assets_backend.js:4101 Traceback: TypeError: Cannot read property 'type' of undefined at Class.format_xy_value (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/474-bfd16b8/web.assets_backend.js:4101:72) at Class.compute_totals (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/474-bfd16b8/web.assets_backend.js:4105:142) at Class.start (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/474-bfd16b8/web.assets_backend.js:4112:90) at Class.prototype.(anonymous function) [as start] (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:3010:559) at http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:3113:963 at http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:547:681 at fire (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:541:299) at Object.add [as done] (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:542:467) at Array.<anonymous> (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:547:649) at Function.each (http://3308592-84-152fd1.runbot1.odoo-community.org/web/content/468-bf677a6/web.assets_common.js:370:767)
Can be related with known issues, but v10?
That's because it's not OCB. Please read known issues section of the README. |
Precisely because I read known issues I asked this:
This section has 1 v8 PR reference and 1 v9 PR reference: |
For v10 I declined to do it again, as it was rejected in previous versions. |
|
||
The patches are already integrated on OCB. | ||
|
||
* Make this work with products with more than 1 attribute. |
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.
Remove this, You can use with one attribute too.
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.
No, the issue is correct. See that it puts "more than 1 attribute", which is the problem indeed in the transfer dialog. I will be any way more specific.
'stock', | ||
'web_widget_x2many_2d_matrix', | ||
], | ||
'demo': [], |
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.
Remove empty key
options="{'no_create': True}" | ||
/> | ||
</group> | ||
<field name="variant_line_ids" |
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.
Put this field inside a group with nolabel, now the field appears in small area.
123a53c
to
e4b0306
Compare
@sergio-teruel changes done |
Only one question about JS error ... is not very usable.. ¿the v9 commit would be for v10? |
In OCB v10 it's already integrated. |
e4b0306
to
ebb1c4e
Compare
@Tecnativa