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

[IMP] maintenance_sequence: code, partner_ref and serial_no #159

Closed
etobella opened this issue Sep 28, 2021 · 6 comments
Closed

[IMP] maintenance_sequence: code, partner_ref and serial_no #159

etobella opened this issue Sep 28, 2021 · 6 comments
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@etobella
Copy link
Member

Reviewing odoo code and OCA code I found that fields code and serial_no should fulfill the same logic.

Serial number is a field that should be used to add our internal serial number, as it is unique in our database. On the other side, partner_ref should be used to write the serial number of the vendor/manufacturer. Both fields are searchable using name:

https://github.com/odoo/odoo/blob/master/addons/maintenance/views/maintenance_views.xml#L507-L509

So, code and serial_no are internal identifier. I think the sequence should fulfill serial_no. The biggest problem is how to manage the migration, as it could be complicated to manage (Maybe on the migration from 14 to 15?)

WDYT?

@dalonsod @LoisRForgeFlow

@LoisRForgeFlow
Copy link
Contributor

That makes total sense, thanks for the heads-ups. For me it could even be possible to propose the change in v14 and even v13 if migration scripts are provided.

My 2 cents.

@dalonsod
Copy link
Contributor

@etobella inspecting the code I've found that code isn't actually unique, so you can assign the same code to more than one equipment. I think it's an issue rather than a feature... then, if a migration script e.g. should move current codes to serial_no, when codes are filled and serial numbers not, an error could happen.

@etobella
Copy link
Member Author

Yes, it is not unique, but it will probably be unless you make the sequence wrongly

@etobella
Copy link
Member Author

Also, that's the work of a great migration script 😉

@dalonsod
Copy link
Contributor

dalonsod commented Oct 1, 2021

Yes, it is not unique, but it will probably be unless you make the sequence wrongly

Or you manually fill the same code twice, bypassing sequence automation.

@github-actions
Copy link

github-actions bot commented Apr 3, 2022

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.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 3, 2022
@github-actions github-actions bot closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

3 participants