Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to create a custom method call with passing object. #39

Open
secmohammed opened this issue Feb 15, 2021 · 1 comment
Open

how to create a custom method call with passing object. #39

secmohammed opened this issue Feb 15, 2021 · 1 comment

Comments

@secmohammed
Copy link

Hello, I wanted to make a custom method call at a certain module, and pass an object of another model as this method accepts an object. I tried to send in form of array, json, but no matter what parameter is passed, It throws the error that the parameter is required. so there are two questions here.

  • how to pass a parameter to a function using call method.
  • is it possible to pass an object of another entity to the call method as parameter and odoo recognizes that.?
@ahmadproper
Copy link

//Try this code
$stock_picking_id = 2;
$result=$odoo->call(
'stock.picking',
'action_confirm',
[(int)$stock_picking_id]
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants