Conversation
Currently translated at 83.3% (5 of 6 strings) Translation: partner-contact-12.0/partner-contact-12.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-animal_owner/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-14.0/partner-contact-14.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal_owner/
Currently translated at 22.2% (2 of 9 strings) Translation: partner-contact-14.0/partner-contact-14.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal_owner/fr/
Currently translated at 33.3% (3 of 9 strings) Translation: partner-contact-14.0/partner-contact-14.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal_owner/fr/
Currently translated at 100.0% (9 of 9 strings) Translation: partner-contact-14.0/partner-contact-14.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal_owner/es/
Currently translated at 88.8% (8 of 9 strings) Translation: partner-contact-14.0/partner-contact-14.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal_owner/it/
Currently translated at 100.0% (9 of 9 strings) Translation: partner-contact-14.0/partner-contact-14.0-animal_owner Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-animal_owner/it/
luisDIXMIT
left a comment
There was a problem hiding this comment.
Code reviewed and tested on Runboat, LGTM! Please separate the version change from the pre-commit improvements into a new migration commit. The PR title must be [16.0] [MIG] animal_owner: Migration to 16.0. It’s a convention.
marcos-mendez
left a comment
There was a problem hiding this comment.
Automated Review -- Tests Failed
1. Root Cause of the Test Failure
The test failure is caused by a database connection error during the Odoo server startup, not due to any code logic in the animal_owner module. This is likely due to a misconfiguration or transient issue in the test environment (e.g., runboat infrastructure).
2. Suggested Fix
There is no code fix needed for the animal_owner module itself. The error occurs before the module is even loaded, as the database connection fails. However, to ensure robustness, the PR should be retested after confirming that the environment is stable.
3. Additional Code Issues
There are no real bugs in the provided code. All patterns used are valid for Odoo 16.0 and OCA standards:
- Use of
_inheritwithfields.Many2oneis correct. - The
_compute_animal_countmethod andaction_view_animalsare standard Odoo practices. - The
animal_idsandanimal_countfields are correctly defined with proper dependencies and store logic. - No extensibility hooks are improperly implemented.
4. Test Improvements
To better cover this module, consider adding the following test cases in a tests/ directory using TransactionCase or SavepointCase:
Suggested Test Cases:
- Test
animal_countcomputation:- Create a partner and associate multiple animals.
- Verify
animal_countis correctly computed.
- Test
action_view_animals:- Test that the action opens the correct view based on number of animals (list vs form).
- Ensure domain filtering works when multiple animals are present.
- Test
partner_idfield on animal model:- Create an animal and assign an owner.
- Verify the relationship is correctly stored and retrieved.
OCA Testing Patterns:
- Use
TransactionCasefor tests that require database transactions. - Use
SavepointCaseif you need to isolate test data (e.g., for performance or data integrity). - Tag tests appropriately using
@tag('post_install', 'long_running')if needed.
Example snippet:
def test_animal_count_computation(self):
partner = self.env['res.partner'].create({'name': 'Test Owner'})
animal1 = self.env['animal'].create({'name': 'Fluffy', 'partner_id': partner.id})
animal2 = self.env['animal'].create({'name': 'Buddy', 'partner_id': partner.id})
self.assertEqual(partner.animal_count, 2)This would ensure that the logic for linking animals to partners and computing counts is thoroughly tested.
⏰ This PR has been open for 54 days.
💤 Last activity was 34 days ago.
Every ignored PR is a contributor who might not come back. Review time matters. (OCA Aging Report)
Reciprocal Review Request
Hi everyone! I found some test failures on this PR and left detailed feedback above. I am happy to discuss or help debug. In the meantime, if any of you get a chance, I would appreciate a look at my open PR(s):
My open PRs across OCA:
- server-tools#3554 [MIG] datetime_formatter: Migration to 18.0
- server-tools#3548 [18.0][MIG] base_kanban_stage: Migration to 18.0
- hr-attendance#262 [16.0][ADD] Hr_attendance_idsecure: iDSecure (ControliD) attendance integration
- stock-logistics-workflow#2276 [16.0][ADD] stock_move_line_devaluation
- stock-logistics-workflow#2275 [16.0][ADD] Stock move line analytic account
- stock-logistics-workflow#2268 [16.0][ADD] stock_move_line_picking_partner
- purchase-workflow#2694 [16.0][IMP]Purchase workflow added to review state & exception fix
Reviewing each other's work helps the whole community move forward. Thank you!
Environment via OCA Neural Reviewer: Minikube + K8s Job + oca-ci/py3.10-odoo16.0 | Odoo 16.0
Automated review by OCA Neural Reviewer + qwen3-coder:30b
Migration of
animal_ownerto version 16.0