Odoo Aide

0

0
8 Réponses
0
Avatar

Ibrahim Boudmir Maroc

--Ibrahim Boudmir--
5482
| 6 3 7
Casablanca, Maroc
--Ibrahim Boudmir--


Ibrahim Boudmir Maroc
25/01/2019 05:12

Hi, 

I assume that skype_bot is an instance of my.skype object.
You only need to do this : skype_bot.send_message(message)

You can write back if this does not help.

0
Andrei Kuchuk Biélorussie
25/01/2019 05:28
if i use skype_bot.send_message(message) i get this
сту 25 13:23:55 PK odoo12[15652]:   File "/opt/odoo12/odoo-custom-addons/skype_bot/models/models.py", line 42, in <module>
сту 25 13:23:55 PK odoo12[15652]:     class MySkype(skpy.SkypeEventLoop):
сту 25 13:23:55 PK odoo12[15652]:   File "/opt/odoo12/odoo-custom-addons/skype_bot/models/models.py", line 86, in MySkype
сту 25 13:23:55 PK odoo12[15652]:     skype_bot.send_message(message)
сту 25 13:23:55 PK odoo12[15652]: TypeError: send_message() missing 1 required positional argument: 'message'
5 Commentaires
Ibrahim Boudmir Maroc
25/01/2019 05:50

Well then, i don't think skype_bot in an instance of the object my.skype

Can you print it and tell me the output ?

Andrei Kuchuk Biélorussie
25/01/2019 06:07

could you tell me more precisely what i need to print

Ibrahim Boudmir Maroc
25/01/2019 06:11

print(skype_bot)

Andrei Kuchuk Biélorussie
25/01/2019 06:44

I print this code

_logger.info('================' * 10)

_logger.warning(print(skype_bot))

print(skype_bot)

_logger.warning(skype_bot)

_logger.info('================' * 10)

and get this

сту 25 14:40:54 PK odoo12[16879]: 2019-01-25 11:40:54,410 16879 INFO odoo12 odoo.addons.skype_bot.models.models: ==============================================

сту 25 14:40:54 PK odoo12[16879]: 2019-01-25 11:40:54,410 16879 WARNING odoo12 odoo.addons.skype_bot.models.models: None

сту 25 14:40:54 PK odoo12[16879]: 2019-01-25 11:40:54,410 16879 WARNING odoo12 odoo.addons.skype_bot.models.models: <class 'odoo.addons.skype_bot.models.models.skype_bot'>

сту 25 14:40:54 PK odoo12[16879]: 2019-01-25 11:40:54,411 16879 INFO odoo12 odoo.addons.skype_bot.models.models: =========================================================

Andrei Kuchuk Biélorussie
25/01/2019 08:33

i try to call func like: with api.Environment.manage(): , it's didn't help me too

-1

Hi,

Call method with self.send_message(message)

Poser une question
Writer
Étiquettes
Keep Informed
1 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now