openspp / openspp-program Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
It creates a big performance issue to do it that way. defining a criteria for this would be more efficient.
Create a new module that auto-enrols a group or an individual to a program.
Run this cron every hour.
Change UI Labels
The main issue we aim to address is the undesired loading of demo items in the Odoo stock management module, company, accounting, users, and others, which we aim to achieve without modifying the core code of Odoo.
To achive this, we need to disable the creation of demo data during database initialization.
1. Clone spp docker repo.
2. Invoke Commands
3. Accessing application
In the entitlement manager, add a selection of card types. This will be used in recording the card number of the registrants when the entitlements are generated.
1. Define the SQL eligibility criteria during program creation:
2. Modify the SQL eligibility criteria:
After defining or modifying the SQL eligibility criteria, the beneficiaries must be re-validated.
1. An error occurred when the in-kind entitlements are sent for approval.
Error log:
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 687, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 348, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 916, in __call__
return self.method(*args, **kw)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 535, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/auto/addons/web/controllers/main.py", line 1346, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo/auto/addons/web/controllers/main.py", line 1334, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/custom/src/odoo/odoo/api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/custom/src/odoo/odoo/api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/auto/addons/g2p_programs/models/cycle.py", line 184, in to_approve
self.program_id.get_manager(
File "/opt/odoo/auto/addons/spp_entitlement_in_kind/models/entitlement_manager.py", line 170, in set_pending_validation_entitlements
self._set_pending_validation_entitlements_async(cycle, entitlements_count)
File "/opt/odoo/auto/addons/g2p_programs/models/managers/entitlement_manager.py", line 67, in _set_pending_validation_entitlements_async
entitlements_count = len(entitlements)
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/custom/src/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: object of type 'int' has no len()
2. Creation of cycles is not enrolling eligible registrants to the new cycle.
3. Registrants are not enrolled to cycle when the "Verify Eligibility" is clicked.
Increase test coverage for openspp_program
Hello :) Really nice Initiative!
I tried testing the OpenSPP packages on my Odoo15 test installation, but it looks like they have still a lot of dependencies on the OpenG2P repos.
Are you planning to port all these G2P addons over or is it intended to stay an external dependency?
To move to job queue:
UI fixes:
Description:
We are introducing a new feature to our OpenSPP program management system: Compliance Criteria. This is conceptually similar to Enrollment Criteria, yet with operational differences.
Requirements:
Compliance Criteria are ongoing conditions that enrolled participants must continue to meet in order to stay active in a program and receive its benefits. Compliance checks would occur regularly at each program cycle.
Just like with the enrollment criteria, the compliance criteria should be flexible and customizable for each program, as different programs may have different compliance rules.
Technically, the compliance criteria check should be similar to that of the enrollment criteria check, but with a crucial difference: while enrollment criteria are evaluated once, compliance criteria need to be evaluated at each defined cycle or period.
Example:
In the 'cash for work' program, the enrollment criteria could be based on the unemployment status and income level, but the compliance criteria would look at whether the individual has worked the required number of days in a month.
Tasks:
Outcome:
Fully functional compliance criteria feature that provides regular checks and validation against defined program rules.
The cron job will check the eligibility.
Payment related transactions
This requires the data populated by the API
Each program within the OpenSPP system needs to have a unique identification. This will be represented by the program_id
field.
program_id
is a string and should be auto-generated by the system.program_id
should be PROG_{SEQ}
.
PROG_
is a static prefix.{SEQ}
is a dynamically generated unique sequence number.{SEQ}
should increment for each new program.program_id
. This implies that program_id
should be indexed in the database to allow efficient searching and sorting.program_id
should also serve as the XML ID of the record, facilitating easy referencing of the program in XML files and throughout the system.program_id
should be unique. The system should not allow the creation of two programs with the same program_id
.program_id
should not be editable by users once the program is created. This is to maintain the integrity of the program_id
.This detailed specification aims to improve the handling and identification of programs within the OpenSPP system. The unique program_id
not only ensures the uniqueness of each program but also enhances the search and sorting capabilities, providing a better user experience.
While it can be done now, it could become complex to manage when the criteria list grows. We can add another field where we can define the domain of the excluding criteria.
We then merge the inclusion and exclusion domains this way:
INCLUSION AND NOT EXCLUSION
in the query
When a program is created, we need to be able to define how an entitlement is associated with a service point, if necessary.
For clarifications:
The program will implement a new eligibility manager named TagBasedEligibilityManager. It will inherit from BaseEligibilityManager and will determine eligibility based on a registrant's tag and their association with a specific area, including all of its child areas. The system will prevent any infinite recursion within the area hierarchy. If both tag and area criteria are specified, a registrant must meet both to be considered eligible.
The new manager will be responsible for enrolling and importing registrants, ensuring the new eligibility criteria are upheld during both processes. To optimize performance with potentially large datasets, the manager will utilize pagination or batching techniques during these operations.
1. Define the Tag eligibility criteria during program creation:
2. Modify the Tag-based eligibility criteria
After defining or modifying the Tag-based eligibility criteria, the beneficiaries must be re-validated.
If the target type is "Individual", the entitlement manager is "default", and there are no filters defined, the function that imports eligible registrants is getting all records from res.partner.
This includes records with the following:
In OpenG2P Program
, make validate_entitlements
async the same way as we did for prepare_entitlements
( https://github.com/OpenG2P/openg2p-program/pull/6/files )
Payment error codes representation for API specification
We need to define the process for QA. This should cover:
Now we do days:
https://github.com/OpenG2P/openg2p-program/blob/15.0/g2p_programs/models/managers/cycle_manager.py#L115
We should have the option to set the recurrence. Check other odoo modules, they use rrule.
See if we can reuse the code used in the calendar module:
https://github.com/odoo/odoo/blob/fa58938b3e2477f0db22cc31d4f5e6b5024f478b/addons/calendar/models/calendar_recurrence.py#L92
Since we don't yet have a description of the included functionality for ACF we will start of with updating the existing test repository of generic OpenSPP test cases. The aim of this is to onboard Adrian in the OpenSPP functionality as well as to provide a possible outline of test suites and test cases to be reused once the ACF expected functionality is available.
The areas to cover are as below:
For each program, instead of defining a set of criteria, we can define a formula to calculate a score that is then used to enrol the X top registrants.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.