Conversation
Saran440
commented
Mar 14, 2024
- Test script
|
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. |
|
/ocabot migration hr_expense_petty_cash |
7fb87f5 to
ae2d63e
Compare
ae2d63e to
dbca282
Compare
|
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. |
|
hi @Saran440 I have tested this module in my local, and LGTM. |
|
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. |
|
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. |
Currently translated at 100.0% (35 of 35 strings) Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_petty_cash Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_petty_cash/it/
Currently translated at 100.0% (35 of 35 strings) Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_petty_cash Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_petty_cash/it/
Currently translated at 100.0% (35 of 35 strings) Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_petty_cash Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_petty_cash/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_petty_cash Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_petty_cash/
Currently translated at 100.0% (35 of 35 strings) Translation: hr-expense-15.0/hr-expense-15.0-hr_expense_petty_cash Translate-URL: https://translation.odoo-community.org/projects/hr-expense-15-0/hr-expense-15-0-hr_expense_petty_cash/es/
8b6976a to
0dd57e7
Compare
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 occurs because the database connection failed during the Odoo server startup, likely due to misconfiguration or unavailability of the PostgreSQL database at postgres.runboat-infra.svc.cluster.local:5432. This is not a code issue but an infrastructure or environment problem.
2. Suggested Fix
No code fix is required for this specific error. However, to prevent such failures in CI environments:
- Ensure that the PostgreSQL service is running and accessible.
- Confirm that the database credentials and host configuration are correct in
odoo.conf. - Verify that the
runboatinfrastructure is properly set up for testing.
3. Additional Code Issues
There are no functional bugs in the provided diff. The code appears to follow OCA patterns correctly:
- Use of
_get_and_prepare_methods as extension hooks. - Proper use of modifiers (domain lists) in views.
- Correct usage of
setup_modifiersandfields_get()patterns. - No misuse of extensibility hooks or incorrect overrides.
4. Test Improvements
To better cover the new functionality, consider adding the following test cases using TransactionCase or SavepointCase:
Test Cases to Add:
-
Petty Cash Holder Creation and Balance Update:
- Create a petty cash holder with a limit.
- Add a vendor bill to increase the balance.
- Verify the balance updates correctly.
-
Expense Creation with Petty Cash:
- Create an expense paid by petty cash.
- Select a petty cash holder.
- Ensure the system checks balance and prevents over-expenses.
-
Expense Report with Petty Cash:
- Create an expense report with multiple expenses from the same petty cash holder.
- Validate that the system prevents reports from multiple petty cash holders.
-
Invoice Validation with Petty Cash:
- Validate that invoices with petty cash checked must contain only one line.
- Ensure that account on invoice line matches the petty cash holder’s account.
OCA Testing Patterns:
- Use
TransactionCasefor tests that require database transactions. - Use
SavepointCasefor tests that need to rollback changes without affecting other tests. - Tag tests with
@tag('petty_cash')for better organization and filtering.
Example:
@tag('petty_cash')
class TestPettyCashExpense(TransactionCase):
def test_expense_with_insufficient_balance(self):
# Create petty cash holder
# Add balance
# Create expense exceeding balance
# Assert error is raisedThese tests ensure the module behaves as expected under various scenarios and aligns with OCA quality standards.
⚠️ PR Aging Alert: CRITICAL
This PR by @Saran440 has been waiting for 731 days — that is over 24 months without being merged or closed.
💤 No activity for 90 days. Has this PR been forgotten?
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