ERP-Ukraine / odoo-rpc-dart

Odoo RPC Library for Dart
MIT License
43 stars 32 forks source link

update data in an existing module #20

Closed aslamibnabdulla closed 2 years ago

aslamibnabdulla commented 2 years ago

Hi, How can we update data in a module .I want to change the name of driver assigned to car in the fleet module. Secondly, Can we stream into the Discuss module from apps ? Can u show an example for both problems.

lem8r commented 2 years ago

Hi!

You can call write method on a car record to update it's field value.

Discuss app uses longpolling to get new message notification. You can call /longpolling/pool with callRPC method.

In general this library gives you ability to do rpc calls without bothering how to handle session updates.

You can call any public methods on any model same as Odoo's frontend does.

aslamibnabdulla commented 2 years ago

thanks for the solution,

But can u provide an example for both situations.

lem8r commented 2 years ago

https://github.com/ERP-Ukraine/odoo-rpc-dart/blob/master/example/odoo_rpc_example.dart#L79-L89

Just change model name and method.