Skip to content

Commit

Permalink
Merge pull request #282 from Q-Niranjan/17.0-1.2-Impoter
Browse files Browse the repository at this point in the history
Added Background Processing Using Job Queue For SR-Impoter
  • Loading branch information
shibu-narayanan authored Jan 9, 2025
2 parents a633cef + 930700d commit 3e27b1b
Show file tree
Hide file tree
Showing 8 changed files with 538 additions and 106 deletions.
2 changes: 2 additions & 0 deletions g2p_social_registry_importer/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
],
"data": [
"data/ir_config_params.xml",
"data/ir_cron_data.xml",
"data/social_registry_data_source.xml",
"data/search_criteria.xml",
"security/ir.model.access.csv",
"views/fetch_social_registry_beneficiary_views.xml",
"views/res_config_view.xml",
],
"external_dependencies": {"python": ["camel_converter"]},
"application": True,
Expand Down
7 changes: 7 additions & 0 deletions g2p_social_registry_importer/data/ir_config_params.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
name="set_param"
eval="('g2p_import_social_registry.max_registrants_count_job_queue', 100)"
/>

<!-- This configuration helps to enable or disable the background processing. -->
<function
model="ir.config_parameter"
name="set_param"
eval="('g2p_import_social_registry.enable_async', False)"
/>
</odoo>
13 changes: 13 additions & 0 deletions g2p_social_registry_importer/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="ir_cron_process_social_registry_imports" model="ir.cron">
<field name="name">Process Social Registry Imports</field>
<field name="model_id" ref="model_g2p_fetch_social_registry_beneficiary" />
<field name="state">code</field>
<field name="code">model.fetch_social_registry_beneficiary()</field>
<field name="interval_number">10</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
</record>
</odoo>
1 change: 1 addition & 0 deletions g2p_social_registry_importer/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from . import fetch_social_registry_beneficiary
from . import imported_registrants
from . import res_partner
from . import res_config
Loading

0 comments on commit 3e27b1b

Please sign in to comment.