22 lines
1.0 KiB
HTML
22 lines
1.0 KiB
HTML
<section class="oe_container">
|
|
<div class="oe_row oe_padded">
|
|
<h2 class="oe_slogan" style="color:#7C7BAD;">Firebase Integration</h2>
|
|
|
|
<h3>Configuration</h3>
|
|
<p>Add the following key to your <code>odoo.conf</code> file:</p>
|
|
<pre style="background-color: #f8f9fa; border: 1px solid #dee2e6; padding: 10px; border-radius: 4px;"><code>[options]
|
|
firebase_private_key_path = /home/documents/cre.json</code></pre>
|
|
|
|
<h3>Usage</h3>
|
|
<p>Import and call the function anywhere within your backend Odoo modules:</p>
|
|
<pre style="background-color: #f8f9fa; border: 1px solid #dee2e6; padding: 10px; border-radius: 4px;"><code>from odoo.addons.firebase_integration.tools.firebase import send_firebase_notifications
|
|
|
|
msg = [
|
|
{'token': 'DEVICE_TOKEN_1', 'body': 'Notification Body', 'title': 'Notification Title'},
|
|
{'token': 'DEVICE_TOKEN_2', 'body': 'Another Body', 'title': 'Another Title'}
|
|
]
|
|
|
|
success_sent_message_count = send_firebase_notifications(msg)</code></pre>
|
|
</div>
|
|
</section>
|