Skip to content
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

Feature: Show the number of selected records on the wizard #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atularvind
Copy link
Contributor

This PR will adds a feature to show number of records selected records on the Create Disbursement & Register Into Program wizard.

@saltonmassally
Copy link
Contributor

@atularvind can u please attach screenshots of wizard?

@atularvind
Copy link
Contributor Author

@saltonmassally, here it is
image
image


@api.depends('use_active_domain')
def _compute_selected_record(self):
self.all_record_count = self.env['openg2p.beneficiary'].search_count([])
Copy link
Contributor

Choose a reason for hiding this comment

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

@atularvind use should be passing active_domain like I do in the code to filter beneficiaries to act on

@@ -29,6 +29,14 @@ class RegisterWizard(models.TransientModel):
required=True,
)
use_active_domain = fields.Boolean('Use active domain')
selected_record_count = fields.Integer('Selected Record Count', compute="_compute_selected_record")
all_record_count = fields.Integer('All Record Count', compute="_compute_selected_record")
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to active_domain_record_count

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.

Select "all from domain" wizards should show count of records matching domain
2 participants