odoo

Last updated:

0 purchases

odoo Image
odoo Images
Add to Cart

Description:

odoo

Odoo #
odoo api using endpoint /web/dataset/call_kw
Usage #
Initialize #
import 'package:odoo/odoo.dart';
final odoo = Odoo(Connection(url: Url(Protocol.http, "localhost", 8069), db: 'odoo'));
copied to clipboard
Connection Operation #
Connect #
UserLoggedIn user = await odoo.connect(Credential("admin", "admin"));
copied to clipboard
Disconnect #
await odoo.disconnect();
copied to clipboard
Session Change #
odoo.session.stream.listen((Session? session) {
print('session changed ${session?.toJson()}');
});
copied to clipboard
Database Operation #
Insert #
String tableName = "res.users";
Map<String,dynamic> args = {"login":"tester",name:"tester"};
await odoo.insert(tableName, args);
copied to clipboard
Update #
String tableName = "res.users";
int id = 999;
Map<String,dynamic> args = {"login":"tester",name:"tester"};
await odoo.update(tableName, id, args);
copied to clipboard
Delete #
String tableName = "res.users";
int id = 999;
await odoo.delete(tableName, id);
copied to clipboard
Query #
String from = "res.users";
List<String> select = ["id","login","name"];
List<dynamic> where = ["id","=",999];
String orderBy = "login ASC";
await odoo.query(from: from, select: select, where: where, orderBy: orderBy, limit: 10, offset: 0);
copied to clipboard
Read #
String tableName = "res.users";
int id = 999;
await odoo.read(tableName,id);
copied to clipboard
Developer #
Before publish to pub.dev, make sure you run following command:
#generate model file
flutter pub run build_runner build

#testing
flutter test
copied to clipboard
and dont forget to uncomment #Generate File at .gitignore

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.