Odoo addon to store information about Robonomics Report Service users.
Requirements:
Instalaltion:
mkdir ~/src/custom
cd ~/src/custom
git clone https://github.com/PinoutLTD/rrs-odoo-addon.git
Post installation:
A Robonomics Subscription
product should be created. Navigate to Invoicing -> Products and create a new Product with the name Robonomics Subscription 1 month
paid
and not paid
statuses should be created on Robonomics Report Service addon. Navigate to Robonomics Report Service -> Dashboard -> Status and create paid
and not paid
statuses.
To ensure the proper functioning of the Robonomics Report Service, it's necessary to set up specific Automated Actions. In Odoo, navigate to Settings -> Technical -> Automation -> Automated Actions.
-
Create an action with the name
invoice email
. Model:Journal Entry
, TriggerOn Update
, Trigger FieldsStatus (account.move)
, Apply on:[("invoice_line_ids.product_id", "=", "Robonomics Subscription 1 month")]
, Action To Do:Send Email
, Email Template:Invoice: Sending
, Send asEmail
. -
Create an action with the name
rrs_payment
. Model:Robonomics Report Service Register
, TriggerOn Update
, Trigger FieldsStatus (rrs.register)
, Action To Do:Execute Python Code
. Add the following code to thePython Code
field, specifying the correct address of your RRS Registar.
WEBHOOK=,your RRS Registar address.
data = {
"id": record.id,
"email": record.customer_email,
"address": record.address,
"status": record.status.id,
"owner_address": record.owner_address
}
make_request("POST", WEBHOOK, json=data)
Launch:
Launch Odoo providing the addon's path:
python3 odoo-bin --addons-path=addons,../src/custom/helpdesk,../src/custom/rrs-odoo-addon --workers 2