wefra-odoo11/custom/scripts/checkFreeTasks.php

18 lines
536 B
PHP
Raw Normal View History

2019-10-02 21:28:58 +00:00
<?php
session_start();
require_once('../modules/ripcord.php');
$url = $_SESSION['erp']['url'];
$db = $_SESSION['erp']['db'];
$username = $_SESSION['user']['email'];
$password = $_SESSION['user']['password'];
$common = ripcord::client($url."xmlrpc/2/common");
$uid = $common->authenticate($db, $username, $password, array());
$models = ripcord::client($url."xmlrpc/2/object");
$res = $models->execute_kw($db, $uid, $password, 'project.task', 'search', [[['user_id', '=', false],['published', '=', true]]]);
echo implode(",", $res);