Migration to version 13.0
Closed this issue · 11 comments
Todo
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0
Modules to migrate
- base_maintenance - By @NuriaMForgeFlow #71
- base_maintenance_group #148
- maintenance_equipment_contract
- maintenance_equipment_custom_info
- maintenance_equipment_hierarchy - By @dalonsod #76
- maintenance_equipment_scrap - By @astirpe #87
- maintenance_equipment_sequence - By @NuriaMForgeFlow #69
- maintenance_equipment_status - By @JoanSForgeFlow #78
- maintenance_equipment_tags
- maintenance_plan - By @NuriaMForgeFlow #70
- maintenance_plan_activity - By @JoanSForgeFlow #79
- maintenance_project - By @dalonsod #74
- maintenance_project_plan - By @dalonsod #77
- maintenance_remote
- maintenance_request_sequence
- maintenance_request_stage_transition - By @dalonsod #84
- maintenance_team_hierarchy
- maintenance_timesheet - By @dalonsod #82
Missing module? Check https://github.com/OCA/maintainer-tools/wiki/%5BFAQ%5D-Missing-modules-in-migration-issue-list
Hi,
I would like to help improving readme files by adding details and screenshots.
Unfortunately, Github tells me I can't upload screenshots (PNG files) because I don't have push authorization.
Could you help me with that?
Thank you for your great work!
You have to do it in local, adding the files to the repo and pointing them in the README, and then push the result.
Hi
I need maintenance_sotck module in 13 version and i'm migrate module but have one error in hooks.py specific in line 16 warehouse._create_missing_locations(vals={}) is this the error:
File "/mnt/maintenance_stock/hooks.py", line 16, in post_init_hook
warehouse._create_missing_locations(vals={})
File "/home/odoo/odoo/addons/stock/models/stock_warehouse.py", line 568, in _create_missing_locations
sub_locations = warehouse._get_locations_values(dict(vals, company_id=company_id), warehouse.code)
TypeError: _get_locations_values() takes 2 positional arguments but 3 were given
already update my odoo addons.
Hello @rhe-mastercore, thanks for migrating maintenance_stock
addon!
If you look at the differences between v12 and v13 Odoo stock
main module, then you'll find out that maintenance_stock
should need some adaptations from v12 implementation. maintenance_stock
overrides stock.warehouse._get_locations_values()
method, and this method has an extra parameter in v13. You can check it comparing https://github.com/odoo/odoo/blob/13.0/addons/stock/models/stock_warehouse.py#L511 and https://github.com/odoo/odoo/blob/12.0/addons/stock/models/stock_warehouse.py#L437
Then, the error points to v13 implementation called with the extra parameter breaks with the _get_locations_values()
implementation of maintenance.stock
, still without this extra parameter.
hi @dalonsod
check what you say, but in the same way I did not let myself move forward, what I did was heed the function _create_missing_locations of the stock.warehouse model and change this line
sub_locations = warehouse._get_locations_values (
dict (vals, company_id = company_id), warehouse.code)
for this
sub_locations = warehouse._get_locations_values (vals)
this is good?
This change shouldn't be the right one, since you're trying to change Odoo code. Instead of this, you should change OCA addon code in order to adapt it to Odoo code.
You should make changes at this point of https://github.com/OCA/maintenance/blob/12.0/maintenance_stock/models/stock_warehouse.py#L71 , making the code similar to https://github.com/odoo/odoo/blob/13.0/addons/stock/models/stock_warehouse.py#L511
Anyway, if you make the PR with your v13 implementation, your code could be easier reviewed and fixed, you can try. Also you can check https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-13.0 for migration guidelines.
Is the maintenance_stock migration still ongoing or has it been abandoned?
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.