Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of using angular tryton to fetch parties and addresses
'use strict';
angular.module('trytonCrmApp')
.factory('party', [
'session',
function (session) {
var getAll = function (domain, offset, limit) {
return session.rpc('model.party.party.search_read', [
domain || [], offset || null, limit || 20
]);
};
var getAddresses = function (ids) {
return session.rpc('model.party.address.read', [ids]);
};
return {
getAll: getAll,
getAddresses: getAddresses
};
}
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.