Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4375 Переглядів

Hi,

I'm working with the Odoov14 API and I've been able to create a new entry in the res_partner table, using res.partner / create method.

Now I would like to associate the fiscal position (account_fiscal_position) for that customer in the same call (or in a second call). Do you know which method / parameters should I pass?

The API documentation does not have any information about this.

Thanks

Аватар
Відмінити
Автор

Jack Dane answer is correct :)

Найкраща відповідь

Hello Pau, 

If you are talking about setting a Fiscal position on the drop-down on the contact record, you just need to supply the id of the fiscal position with the call. 

Here is an example in PHP.

$common = ripcord::client("$url/xmlrpc/2/common");
$common->version();

$uid = $common->authenticate($db, $username, $password, array());

$models = ripcord::client("$url/xmlrpc/2/object");
$id = $models->execute_kw($db, $uid, $password,
    "res.partner", "create",
    array(
        array(
            "name" => "New Partner",
            "property_account_position_id" => 1
        )
    )
);

I hope this solves your issue,

Thanks, 

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
січ. 23
1626
0
вер. 21
1965
0
лип. 21
4773
3
січ. 25
3137
0
бер. 23
113