-
Notifications
You must be signed in to change notification settings - Fork 289
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
[MIG] stock_manual_transfer: Migration to 18.0 T#88384 #1692
base: 18.0
Are you sure you want to change the base?
[MIG] stock_manual_transfer: Migration to 18.0 T#88384 #1692
Conversation
- New module added in order to allow the user to create stock transfers manually.
Due to upstream updates adding support for @api.ondelete and pre-commit-vauxoo detecting the override of .unlink() method as a code smell, this transforms the old logic into more idiomatic odoo code.
…inal commit While the original fix (Vauxoo@cbd70ff) did fix the immediate lint messages, we didn't actually stop it from calling super().unlink(), thus it didn't actually fix what it intended to fix. Here we remove that call to super().unlink() so the issue is properly fixed.
Add domain to route_id field to show the only the routes that are supplied_wh_id = warehouse_id. This is to avoid inconsistencies between the rule and the warehouse.
To prevent any potential duplication, this fix introduces a return-early pattern. Now, transfers are not created if the manual transfer record has already been published. Issue reported on helpdesk ticket #25879
- Changed name for deprecated models like stock.location.route to stock.route and stock move to Operations(stock.move.line) to Stock Moves. - Added user to group uom to fix unit tests and avoid error for not null violation in product uom.
…ithout group A validation error is raised when a user without the "Manage Multiple Units of Measure" access tries to save or validate a manual transfer. This fix allows any user to create manual transfers, but only users with "Units of Measure" access can modify this attribute on the lines.
Renamed the model 'stock.manual_transfer_line' to 'stock.manual_transfer.line' for consistency with previous versions of this model.
- Update use of quantity as part of [1]. - Simplify the way to define modifiers as states, required, readonly, invisible and column_invisible as part of [2]. - Fix tests. [1] odoo/odoo#137864 [2] odoo/odoo#104741
…sfers Set the default value of the 'warehouse_id' field on the 'stock.manual_transfer' model to the default warehouse of the company.
… group By default, it is recommended that the admin and root users have all permissions due to their roles and to facilitate functional testing.
The name shouldn't be present in the vals list when creating a record and this commit fixes that by making it readonly instead of force_save which lead to the same functional behaviour but without adding the field to the vals list.
Rename group's external ID, from: `group_stock_manual_transferp` → `group_user` to follow usual naming conventions. The reason for the old name is first implementation of this was not as a standalone module. In addition, IDs and names of model access rights are also modified to follow conventions.
Since now only routes matching the selected warehouse are displayed [1], the demo route should have the supplied warehouse set to be selectable. [1]: 62ec4c4
The fields for `warehouses_selectable` and `manual_transfers_selectable` were placed on a single line. There was no clarity on what they represented, as they were just two checkboxes without the appropriate labels. Therefore, `manual_transfers_selectable` was placed on its own line.
Changelog: - Bump version to 18.0.1.0.0 - Use location_final_id instead of location_dest_id because are not getting the values from stock rules but operation type, and location in the rule are saved on location_final_id [1] - Add Internal Manual Transfer menu to respect the style of the current Operation menu of Inventory - Add path to action to show a meaningful url (/odoo/stock_manual_transfer) - General changes of this version (tree to list, chatter block, use self.env._, remove no needed invisible field) - Update translations and documentation References: - [1] odoo/odoo@11e69870
79e7d51
to
5812c50
Compare
Hi, @hugho-ad, @luisg123v, @melanievvl and @angelesgl17, please, could you review this MR? Instance: https://www.odoo.sh/project/vauxoo-gpautoservices/branches/18.0-stock_manual_transfer-mig-rolando MR: https://git.vauxoo.com/vauxoo/gpautoservices/-/merge_requests/9 PR Client: Vauxoo/gpautoservices#9 |
cc @desdelinux |
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.
Please adjust references format. They should be:
[1]: https://...
So they're rendered correctly by markdown.
</field> | ||
</record> | ||
|
||
<record id="stock_manual_transfer_tree_view" model="ir.ui.view"> |
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.
tree → list
|
||
<menuitem | ||
id="menu_stock_manual_transfer" | ||
name="Internal Manual Transfer" |
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.
Shouldn't it be in plural?
If so, please fix window action name. I think this is an issue comming from the previous 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.
I do not know, you tell me hahaha, so should it be fixed on the previous 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.
Yes please, that was probably my bad.
Changelog:
getting the values from stock rules but operation type, and location
in the rule are saved on location_final_id [1]
Operation menu of Inventory
(/odoo/stock_manual_transfer)
self.env._, remove no needed invisible field)
References: