Skip to content
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

[14.0][MIG] maintenance_stock: Migration to 14.0 #347

Open
wants to merge 14 commits into
base: 14.0
Choose a base branch
from

Conversation

Reyes4711-S73
Copy link

Standard migration to 14.0

@dalonsod
Copy link
Contributor

dalonsod commented Jul 6, 2023

Hello @Reyes4711-S73 your PR is based on #337 , isn't it?

Please check, because that PR has new adjustments since you've cloned it

@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch from edb1746 to 78728b3 Compare July 6, 2023 06:42
@Reyes4711-S73
Copy link
Author

@dalonsod I added your last changes in my migration PR

@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch from 78728b3 to f20543b Compare July 6, 2023 07:04
@dalonsod
Copy link
Contributor

dalonsod commented Jul 6, 2023

Please check errors in tests

@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch from f20543b to bc0a774 Compare July 7, 2023 06:22
</function>
<function model="stock.inventory" name="action_validate">
<function
eval="[[('state','=','draft'),('id', '=', ref('maintenance_stock.stock_inventory_toner'))]]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The inventory for demo product is In Progress when installing the module:
Screen Shot 2023-07-09 at 2 00 07 PM

Perhaps it is this line that does not allow validating the inventory. Maybe the state at this moment is confirm (not tested).

Suggested change
eval="[[('state','=','draft'),('id', '=', ref('maintenance_stock.stock_inventory_toner'))]]"
eval="[[('state','=','confirm'),('id', '=', ref('maintenance_stock.stock_inventory_toner'))]]"

Can you review please ?

@dalonsod
Copy link
Contributor

@Reyes4711-S73 I've still found some issues in commit history:

  • Your migration commit has some changes that are already made in current v13 migration commit. That's because you your commit history is still created from an old version. Please check.
  • Pre-commit stuff commit has adjustments in test file that shouldn't belong to that commit. If fix in tests are needed, please place them in migration commit.

dalonsod and others added 13 commits August 16, 2023 09:23
Currently translated at 96.7% (29 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/es/
Currently translated at 100.0% (30 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/pt_BR/
Currently translated at 100.0% (30 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/it/
Currently translated at 100.0% (30 of 30 strings)

Translation: maintenance-12.0/maintenance-12.0-maintenance_stock
Translate-URL: https://translation.odoo-community.org/projects/maintenance-12-0/maintenance-12-0-maintenance_stock/it/
@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch 6 times, most recently from c9e4180 to 3ee7028 Compare August 16, 2023 08:16
@Reyes4711-S73
Copy link
Author

@mamcode @dalonsod I added the merged commit and solved some issues. Please, review it

Copy link
Member

@mamcode mamcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Reyes4711-S73 Thanks for the applied fixes.

Only a comment about the value used for field delivery_steps in stock.warehouse can you review please.

maintenance_stock/data/demo_maintenance_stock.xml Outdated Show resolved Hide resolved
@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch from 3ee7028 to 117ae55 Compare September 4, 2023 08:25
@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch 2 times, most recently from 74ce106 to 3c453fe Compare September 18, 2023 06:43
@Reyes4711-S73
Copy link
Author

@mamcode done

Copy link
Member

@mamcode mamcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mamcode
Copy link
Member

mamcode commented Sep 19, 2023

@dalonsod Can you check this PR again please?

Copy link
Contributor

@dalonsod dalonsod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in runboat 👍 but see at code review required changes

maintenance_stock/models/maintenance_equipment.py Outdated Show resolved Hide resolved
@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch 2 times, most recently from 9efae1f to b573f37 Compare September 22, 2023 05:58
@mamcode
Copy link
Member

mamcode commented Sep 24, 2023

@dalonsod @Reyes4711-S73 Hello, I see errors in the Odoo test job that seem to have nothing to do with the code of this PR, how can we run the jobs again?

@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch from b573f37 to 3ab39ac Compare September 25, 2023 05:59
@dalonsod
Copy link
Contributor

Hello @mamcode , it's a known issue, please check odoo/odoo#122569 (comment)

Copy link

There hasn't been any activity on this pull request in the past 4 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 PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 28, 2024
@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch 2 times, most recently from 7754dd7 to 07b3541 Compare January 29, 2024 07:01
@dalonsod
Copy link
Contributor

@etobella is this PR ready to be merged? Thanks!

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few questions before merging

def _get_locations_values(self, vals):
sub_locations = super()._get_locations_values(vals)
def _get_locations_values(self, vals, code=False):
sub_locations = super()._get_locations_values(vals, code)
code = vals.get("code") or self.code
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it this the same code provided by the inherited function?

Also, you are overriding a parameter of the function... you should review it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etobella you're right, that code was discussed in v13 here: #337 (review)

I've noticed two things:

  • v13 recommendation wasn't finally attended (code method parameter was finally unused), not fault of this PR.
  • commit history is definetely wrong, because this change shouldn't appear here.

@Reyes4711-S73 please rebuild commit history. See e.g.a7fa359#diff-6f3891aa1e983a123b23df8d101c909e1d2e6812915e7dbda2a820400a25c8b0 , that commit does not belong to v13 implementation and have merge conflicts syntax indeed. You should start again the migration process and strictly add needed changes in last Migration to 14.0 commit.

@etobella sorry I didn't notice that problem...

@@ -173,11 +137,12 @@ def test_picking(self):
("product_id", "=", self.product1.id),
("location_id", "=", self.maintenance_warehouse.wh_cons_loc_id.id),
]
self.assertEqual(stock_quant_obj.search(domain_from).quantity, 0)
self.assertEqual(stock_quant_obj.search(domain_from).quantity, 5)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why now it is 5 and before it was 0?

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

1 similar comment
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 18, 2024
{
"name": "Test equipment",
"allow_consumptions": True,
"equipment_assign_to": "employee",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"equipment_assign_to": "employee",

@Reyes4711-S73 @dalonsod @etobella
I think this field equipment_assign_to should be removed to avoid the dependence of hr_maintenance.

Everything else looks very good.

Copy link

There hasn't been any activity on this pull request in the past 4 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 PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 22, 2024
@Reyes4711-S73 Reyes4711-S73 force-pushed the 14.0-mig-maintenance_stock branch from 07b3541 to 22bdf26 Compare September 30, 2024 07:20
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants