Skip to content

Add support for cash counter#127

Open
bodhish wants to merge 5 commits into
mainfrom
bodhi/cash_counter
Open

Add support for cash counter#127
bodhish wants to merge 5 commits into
mainfrom
bodhi/cash_counter

Conversation

@bodhish

@bodhish bodhish commented Jan 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@bodhish
bodhish requested a review from Copilot January 8, 2026 16:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive cash session management system to replace the previous cash denomination tracking approach. The system tracks cash sessions for cashiers at billing counters, manages transfers between sessions, and integrates with accounting through journal entries.

Key Changes:

  • Replaces denomination-based tracking with session-based cash management
  • Implements cash transfer workflow between counters and main cash
  • Adds API endpoints for external Care system integration
  • Configures company-level cash journal settings

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
cash_denomination/models/cash_session.py New model for tracking cash sessions with lifecycle management (open/close)
cash_denomination/models/cash_transfer.py New model for cash transfers between sessions with acceptance/rejection workflow
cash_denomination/models/res_company.py Adds company configuration for counter and main cash journals
cash_denomination/views/cash_session_views.xml UI views for managing cash sessions
cash_denomination/views/cash_transfer_views.xml UI views for managing cash transfers
cash_denomination/views/res_company_views.xml Company settings page for cash journal configuration and menu structure
care_connector/models/account_journal.py Adds Care Connector code field to journals for API mapping
care_connector/models/account_payment.py Links payments to cash sessions
care_connector/models/bill_counter.py Adds is_main_cash flag to identify main cash location
care_connector/resources/cash_session.py Business logic for session and transfer operations
care_connector/resources/account_move_payment.py Updates payment creation to link with cash sessions
care_connector/controllers/cash_session.py REST API endpoints for session management
care_connector/pydantic_models/cash_session.py Pydantic models for API request/response validation
cash_denomination/manifest.py Updates module metadata and dependencies
cash_denomination/security/ir.model.access.csv Security access rules for new models
Removed files Removes old denomination, wizard, template, controller, and static files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cash_denomination/models/cash_transfer.py
Comment on lines +3 to +12

class AccountJournal(models.Model):
_inherit = 'account.journal'

x_care_journal_code = fields.Selection(
selection=[
('cash', 'Cash'),
('bank', 'Bank'),
('card', 'Card'),
],

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

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

The x_care_journal_code selection values are hardcoded here but should match the payment method types expected by the Care system. Consider moving these to a constant or configuration to ensure consistency with care_connector/resources/account_move_payment.py where journal lookup occurs.

Suggested change
class AccountJournal(models.Model):
_inherit = 'account.journal'
x_care_journal_code = fields.Selection(
selection=[
('cash', 'Cash'),
('bank', 'Bank'),
('card', 'Card'),
],
CARE_CONNECTOR_JOURNAL_SELECTION = [
('cash', 'Cash'),
('bank', 'Bank'),
('card', 'Card'),
]
class AccountJournal(models.Model):
_inherit = 'account.journal'
x_care_journal_code = fields.Selection(
selection=CARE_CONNECTOR_JOURNAL_SELECTION,

Copilot uses AI. Check for mistakes.
Comment thread cash_denomination/models/cash_session.py
Comment on lines +62 to +65
<menuitem id="menu_bill_counter"
name="Bill Counters"
parent="menu_cash_management_root"
action="care_connector.action_bill_counter"

Copilot AI Jan 8, 2026

Copy link

Choose a reason for hiding this comment

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

The menu item references 'care_connector.action_bill_counter' using a cross-module reference without verifying that the action exists. While this appears to be intentional for module integration, consider adding a comment explaining this dependency or ensuring the action is defined in care_connector module.

Copilot uses AI. Check for mistakes.
Comment thread care_connector/resources/account_move_payment.py
Comment thread cash_denomination/models/cash_transfer.py
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.

3 participants