Skip to content

[16.0][MIG] hr_expense_petty_cash#228

Open
Saran440 wants to merge 41 commits intoOCA:16.0from
ecosoft-odoo:16.0-mig-hr_expense_petty_cash
Open

[16.0][MIG] hr_expense_petty_cash#228
Saran440 wants to merge 41 commits intoOCA:16.0from
ecosoft-odoo:16.0-mig-hr_expense_petty_cash

Conversation

@Saran440
Copy link
Member

  • Test script

@github-actions
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 Jul 21, 2024
@Saran440 Saran440 removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 23, 2024
@Saran440
Copy link
Member Author

/ocabot migration hr_expense_petty_cash

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jul 23, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Jul 23, 2024
9 tasks
@Saran440 Saran440 force-pushed the 16.0-mig-hr_expense_petty_cash branch 2 times, most recently from 7fb87f5 to ae2d63e Compare November 12, 2024 11:54
@Saran440 Saran440 changed the title [16.0][MIG][WIP] hr_expense_petty_cash [16.0][MIG] hr_expense_petty_cash Nov 12, 2024
@Saran440 Saran440 force-pushed the 16.0-mig-hr_expense_petty_cash branch from ae2d63e to dbca282 Compare November 13, 2024 06:49
@github-actions
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 Mar 16, 2025
@hitrosol
Copy link

hi @Saran440 I have tested this module in my local, and LGTM.
Can you rebase so I can also test it on runboat ?
Thanks

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 23, 2025
@github-actions
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 Jul 27, 2025
Copy link

@BhaveshHeliconia BhaveshHeliconia left a comment

Choose a reason for hiding this comment

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

Functional review LGTM

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 10, 2025
@github-actions
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 Dec 14, 2025
@Saran440 Saran440 removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 15, 2025
OCA-git-bot and others added 28 commits December 15, 2025 10:33
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/
@Saran440 Saran440 force-pushed the 16.0-mig-hr_expense_petty_cash branch from 8b6976a to 0dd57e7 Compare December 15, 2025 03:33
Copy link

@marcos-mendez marcos-mendez left a comment

Choose a reason for hiding this comment

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

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 runboat infrastructure 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_modifiers and fields_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:

  1. 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.
  2. 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.
  3. 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.
  4. 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 TransactionCase for tests that require database transactions.
  • Use SavepointCase for 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 raised

These 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:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.