-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
[17.0][MIG] maintenance_equipment_sequence #399
[17.0][MIG] maintenance_equipment_sequence #399
Conversation
Currently translated at 100.0% (10 of 10 strings) Translation: maintenance-11.0/maintenance-11.0-maintenance_equipment_sequence Translate-URL: https://translation.odoo-community.org/projects/maintenance-11-0/maintenance-11-0-maintenance_equipment_sequence/es/
Currently translated at 100.0% (10 of 10 strings) Translation: maintenance-13.0/maintenance-13.0-maintenance_equipment_sequence Translate-URL: https://translation.odoo-community.org/projects/maintenance-13-0/maintenance-13-0-maintenance_equipment_sequence/it/
Currently translated at 100.0% (10 of 10 strings) Translation: maintenance-16.0/maintenance-16.0-maintenance_equipment_sequence Translate-URL: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_equipment_sequence/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: maintenance-16.0/maintenance-16.0-maintenance_equipment_sequence Translate-URL: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_equipment_sequence/
c205b1d
to
f636a75
Compare
f636a75
to
42597b4
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.
@Anxo82 see comment, and also, please add sequence_prefix
to category tree and search view in a separate commit, if possible.
cat_01._compute_equipment_code() | ||
|
||
self.assertEqual(equipment_01.serial_no, "TST001") | ||
self.assertEqual(equipment_02.serial_no, "TST002") |
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.
Test improvement suggestion:
cat_01._compute_equipment_code() | |
self.assertEqual(equipment_01.serial_no, "TST001") | |
self.assertEqual(equipment_02.serial_no, "TST002") | |
equipment_03 = self.env["maintenance.equipment"].create( | |
{ | |
"name": "Test Equipment 3", | |
"category_id": False, | |
"serial_no": False, | |
} | |
) | |
self.assertEqual(equipment_01.serial_no, "TST001") | |
self.assertEqual(equipment_02.serial_no, "TST002") | |
self.assertFalse(equipment_03.serial_no) | |
equipment_03.write({"category_id": cat_01.id}) | |
self.assertEqual(equipment_03.serial_no, "TST003") |
_compute_equipment_code()
isn't needed to be directly called because create()
and write()
actually call it. With third equipment case test pending uncovered line will be covered, if I'm not wrong.
b5aabde
to
a2b0350
Compare
@dalonsod could you review please. |
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.
See latest comment, not blocking, I've approved it anyway
<field name="inherit_id" ref="maintenance.hr_equipment_category_view_tree" /> | ||
<field name="arch" type="xml"> | ||
<field name="company_id" position="after"> | ||
<field name="sequence_prefix" /> |
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'd only make a little extra change: making new tree field optional:
<field name="sequence_prefix" /> | |
<field name="sequence_prefix" optional="show" /> |
…ws tree and search
a2b0350
to
ba7e914
Compare
@AdriaGForgeFlow, @NuriaXifre could you review please? |
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, squash migration commits into one, LGTM
This PR has the |
Hello @peluko00 if you are referring to the two latest commits, keeping them separated makes possible porting added functionality to previous Odoo versions, if needed |
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.
test on the runboat
LGTM
Hello @etobella could you merge this PR? Thanks! |
Hello @gurneyalex could you merge this PR? Thanks! |
/ocabot merge nobump |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at ae9cf00. Thanks a lot for contributing to OCA. ❤️ |
Standard migration