Repository navigation
[v13>...]Calling method with positionnal arguments don't work #18
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
try to call a simple message_post in v13 (signature has changed with the * ) : https://github.com/odoo/odoo/blob/13.0/addons/mail/models/mail_thread.py#L1812
example that worked for v<13.0
Long picking_id = (long) 1;
String errorMessage = "test message";
errorMessage = "'<ul>" + errorMessage + "</ul>'";
Object[] prepare1 = session.executeCommand("stock.picking", "message_post", new Object[] {
new Object[]{ picking_id.intValue(), },
errorMessage
}
);
causes :
021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/addons/base/controllers/rpc.py", line 88, in x
mlrpc_2
2021/10/08 10:55:38 - send error messages to pickings.0 - response = self._xmlrpc(service)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/addons/base/controllers/rpc.py", line 68, in _
xmlrpc
2021/10/08 10:55:38 - send error messages to pickings.0 - result = dispatch_rpc(service, method, params)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/http.py", line 141, in dispatch_rpc
2021/10/08 10:55:38 - send error messages to pickings.0 - result = dispatch(method, params)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/service/model.py", line 41, in dispatch
2021/10/08 10:55:38 - send error messages to pickings.0 - res = fn(db, uid, *params)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/service/model.py", line 168, in execute_kw
2021/10/08 10:55:38 - send error messages to pickings.0 - return execute(db, uid, obj, method, *args, **kw or {})
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper
2021/10/08 10:55:38 - send error messages to pickings.0 - return f(dbname, *args, **kwargs)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/service/model.py", line 175, in execute
2021/10/08 10:55:38 - send error messages to pickings.0 - res = execute_cr(cr, uid, obj, method, *args, **kw)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/service/model.py", line 159, in execute_cr
2021/10/08 10:55:38 - send error messages to pickings.0 - result = odoo.api.call_kw(recs, method, args, kw)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/api.py", line 396, in call_kw
2021/10/08 10:55:38 - send error messages to pickings.0 - result = _call_kw_multi(method, model, args, kwargs)
2021/10/08 10:55:38 - send error messages to pickings.0 - File "/opt/odoo/odoo-server/odoo/api.py", line 383, in _call_kw_multi
2021/10/08 10:55:38 - send error messages to pickings.0 - result = method(recs, *args, **kwargs)
2021/10/08 10:55:38 - send error messages to pickings.0 - TypeError: message_post() takes 1 positional argument but 2 were given
didn't find a way to pass body='messagevalue' as parameter thanks to java
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Activity