Skip to Content
Odoo เมนู
  • ลงชื่อเข้าใช้
  • ทดลองใช้ฟรี
  • แอป
    การเงิน
    • ระบบบัญชี
    • ระบบการออกใบแจ้งหนี้
    • ระบบบัญชีรายจ่าย
    • ระบบการจัดการข้อมูลผ่านสเปรดชีต (BI)
    • เอกสาร
    • ระบบลงลายเซ็น
    การขาย
    • ลูกค้าสัมพันธ์
    • การขาย
    • POS ร้านค้า
    • POS ร้านอาหาร
    • ระบบสมัครสมาชิก
    • การเช่า
    การจัดการเว็บไซต์
    • เครื่องมือสร้างเว็บไซต์
    • ระบบการขายออนไลน์
    • บล็อก
    • ฟอรั่ม
    • ไลฟ์แชท
    • ระบบการอบรมออนไลน์
    ซัพพลายเชน
    • คลังสินค้า
    • ระบบการผลิต
    • PLM
    • ระบบการจัดซื้อ
    • การซ่อมบำรุง
    • ระบบจัดการคุณภาพ
    ทรัพยากรบุคคล
    • ข้อมูลพนักงาน
    • ระบบสรรหาบุคลากร
    • ระบบการลา
    • การประเมิน
    • ระบบการแนะนำพนักงาน
    • ระบบจัดการยานพาหนะ
    การตลาด
    • โซเชียลมาร์เก็ตติ้ง
    • การตลาดผ่านอีเมล
    • ระบบการตลาดผ่าน SMS
    • ระบบการจัดงานอีเวนต์
    • การตลาดแบบอัตโนมัติ
    • ระบบแบบสำรวจ
    การบริการ
    • โปรเจกต์
    • ระบบบันทึกเวลา
    • ระบบการจัดการบริการภาคสนาม
    • ระบบดูแลช่วยเหลือ
    • การวางแผน
    • การนัดหมาย
    ประสิทธิผล
    • ระบบแสดงความคิดเห็น
    • ระบบการอนุมัติ
    • ไอโอที
    • VoIP
    • คลังข้อมูล
    • WhatsApp
    แอปพลิเคชันของบุคคลที่สาม Odoo สตูดิโอ แพลตฟอร์มคลาวด์ของ Odoo
  • อุตสาหกรรม
    การค้าปลีก
    • ร้านขายหนังสือ
    • ร้านขายเสื้อผ้า
    • ร้านขายเฟอร์นิเจอร์
    • ร้านขายของชำ
    • ร้านขายฮาร์ดแวร์
    • ร้านขายของเล่น
    Food & Hospitality
    • บาร์และผับ
    • ร้านอาหาร
    • อาหารฟาสต์ฟู้ด
    • Guest House
    • ตัวแทนจำหน่ายเครื่องดื่ม
    • Hotel
    อสังหาริมทรัพย์
    • Real Estate Agency
    • บริษัทสถาปัตยกรรม
    • บริษัทรับเหมา
    • การจัดการอสังหาริมทรัพย์
    • การจัดสวน
    • สมาคมเจ้าของอสังหาริมทรัพย์
    ปรึกษา
    • สำนักงานบัญชี
    • Odoo พาร์ทเนอร์
    • เอเจนซี่การตลาด
    • สำนักงานกฎหมาย
    • บริการสรรหาบุคลากร
    • การตรวจสอบและการรับรอง
    ระบบการผลิต
    • Textile
    • เหล็ก
    • เฟอร์นิเจอร์
    • อาหาร
    • Brewery
    • ของขวัญขององค์กร
    สุขภาพ & ฟิตเนส
    • ชมรมกีฬา
    • ร้านขายแว่นตา
    • ฟิตเนส
    • ผู้ประกอบวิชาชีพด้านสุขภาพ
    • ร้านขายยา
    • ร้านทำผม
    Trades
    • ช่างซ่อม
    • ฮาร์ดแวร์และการสนับสนุนด้านไอที
    • ระบบพลังงานแสงอาทิตย์
    • ช่างทำรองเท้า
    • บริการทำความสะอาด
    • HVAC Services
    อื่น ๆ
    • Nonprofit Organization
    • สำนักงานสิ่งแวดล้อม
    • ร้านเช่าป้ายโฆษณา
    • การถ่ายภาพ
    • ร้านเช่าจักรยาน
    • ตัวแทนจำหน่ายซอฟต์แวร์
    Browse all Industries
  • คอมมูนิตี้
    ศึกษา
    • บทเรียน
    • เอกสารกำกับโปรแกรม
    • การรับรอง
    • การฝึกอบรม
    • บล็อก
    • พอดแคสต์
    เพิ่มศักยภาพให้กับการศึกษา
    • โปรแกรมการศึกษา
    • Scale Up! Business Game
    • เยี่ยมชม Odoo
    รับซอฟต์แวร์
    • ดาวน์โหลด
    • เปรียบเทียบรุ่น
    • เผยแพร่
    ทำงานร่วมกัน
    • Github
    • ฟอรั่ม
    • ระบบการจัดงานอีเวนต์
    • การแปล
    • ร่วมเป็นพาร์ทเนอร์
    • Services for Partners
    • ลงทะเบียนเพื่อสร้างบัญชีบริษัทของคุณ
    รับบริการ
    • ค้นหาพาร์ทเนอร์
    • ค้นหานักบัญชี
    • พบกับที่ปรึกษา
    • บริการติดตั้งระบบเพื่อใช้งาน
    • ข้อมูลอ้างอิงลูกค้า
    • การสนับสนุน
    • อัปเกรด
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    รับการสาธิต
  • ราคา
  • ช่วยเหลือ

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • ลูกค้าสัมพันธ์
  • e-Commerce
  • ระบบบัญชี
  • สินค้าคงคลัง
  • PoS
  • โปรเจกต์
  • MRP
All apps
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
All Posts คน เหรียญรางวัล
แท็ก (View all)
odoo accounting v14 pos v15
เกี่ยวกับฟอรั่มนี้
ช่วยเหลือ

How to create automation to create message in the Discuss Channel?

ติดตาม

รับการแจ้งเตือนเมื่อมีกิจกรรมในโพสต์นี้

คำถามนี้ถูกตั้งค่าสถานะ
Automationodoo16features
3 ตอบกลับ
6508 มุมมอง
อวตาร
Nihat Demir

Hi Everyone, I need help to understand and help to create Automation rules. 

How to create automation rule when User create an opportunity or quotation, create message in the Discuss Channel?

0
อวตาร
ละทิ้ง
Nihat Demir
ผู้เขียน

Could you create me little video or screenshot pls? I am not technical.

Nihat Demir
ผู้เขียน

Thank you Jainesh. I have this error. Also sent you automation page screenshot

https://drive.google.com/file/d/1z9kxuMrqkA7_VIgs-5_BnJtq6wia5I6y/view?usp=sharing

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/16E/odoo/tools/safe_eval.py", line 339, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(1215,)", line 14, in <module>
File "/home/odoo/16E/odoo/models.py", line 1536, in search
res = self._search(domain, offset=offset, limit=limit, order=order, count=count)
File "/home/odoo/16E/odoo/models.py", line 4628, in _search
query = self._where_calc(domain)
File "/home/odoo/16E/odoo/models.py", line 4396, in _where_calc
return expression.expression(domain, self).query
File "/home/odoo/16E/odoo/osv/expression.py", line 447, in __init__
self.parse()
File "/home/odoo/16E/odoo/osv/expression.py", line 672, in parse
raise ValueError("Invalid field %s.%s in leaf %s" % (model._name, path[0], str(leaf)))
ValueError: Invalid field mail.channel.Sales in leaf ('Sales', '=', 'general')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/odoo/16E/odoo/http.py", line 1579, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/home/odoo/16E/odoo/service/model.py", line 134, in retrying
result = func()
File "/home/odoo/16E/odoo/http.py", line 1608, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/home/odoo/16E/odoo/http.py", line 1805, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/home/odoo/16E/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/home/odoo/16E/odoo/addons/base/models/ir_http.py", line 144, in _dispatch
result = endpoint(**request.params)
File "/home/odoo/16E/odoo/http.py", line 698, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/home/odoo/16E/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/16E/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/16E/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/16E/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/16E/odoo/addons/base_automation/models/base_automation.py", line 415, in write
action._process(records, domain_post=domain_post)
File "/home/odoo/16E/odoo/addons/base_automation/models/base_automation.py", line 340, in _process
raise e
File "/home/odoo/16E/odoo/addons/base_automation/models/base_automation.py", line 337, in _process
action_server.sudo().with_context(**ctx).run()
File "/home/odoo/16E/odoo/addons/base/models/ir_actions.py", line 668, in run
res = runner(run_self, eval_context=eval_context)
File "/home/odoo/16E/odoo/addons/website/models/ir_actions_server.py", line 61, in _run_action_code_multi
res = super(ServerAction, self)._run_action_code_multi(eval_context)
File "/home/odoo/16E/odoo/addons/base/models/ir_actions.py", line 538, in _run_action_code_multi
safe_eval(self.code.strip(), eval_context, mode="exec", nocopy=True, filename=str(self)) # nocopy allows to return 'action'
File "/home/odoo/16E/odoo/tools/safe_eval.py", line 353, in safe_eval
raise ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr))
ValueError: <class 'ValueError'>: "Invalid field mail.channel.Sales in leaf ('Sales', '=', 'general')" while evaluating
"# Available variables:\n# - env: Odoo Environment on which the action is triggered\n# - model: Odoo Model of the record on which the action is triggered; is a void recordset\n# - record: record on which the action is triggered; may be void\n# - records: recordset of all records on which the action is triggered in multi-mode; may be void\n# - time, datetime, dateutil, timezone: useful Python libraries\n# - float_compare: Odoo function to compare floats based on specific precisions\n# - log: log(message, level='info'): logging function to record debug information in ir.logging table\n# - UserError: Warning Exception to use with raise\n# - Command: x2Many commands namespace\n# To return an action, assign: action = {...}\n\nmessage = 'Hello Demo Message'\nenv['mail.channel'].search([('Sales', '=', 'general')]).message_post(body=message)"

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://netroneats.com/web/assets/1021-f3ff506/web.assets_backend.min.js:974:163)
at XMLHttpRequest.<anonymous> (https://netroneats.com/web/assets/1021-f3ff506/web.assets_backend.min.js:981:13)

อวตาร
Jainesh Shah(Aktiv Software)
คำตอบที่ดีที่สุด

Hello Nihat Demir,

You Can Create Message in the Discussion Channel using Automated Action.

Find Example in comment.

I hope this will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari


0
อวตาร
ละทิ้ง
Jainesh Shah(Aktiv Software)

For Example -

- Create an Automated action by adding name, model, trigger (creation as per your requirement), filter domain (if required) and Action to do ( Execute Python Code as per your need )

- In the Python Code Below Paste this code:-
message = 'Hello Demo Message'
env['mail.channel'].search([('name', '=', 'general')]).message_post(body=message)
- Note :- For searching channel you have to give the name in the search condition.

อวตาร
MUHAMMAD Imran
คำตอบที่ดีที่สุด

In order to automate the creation of a message in an Odoo Discuss channel, you will need to use the Odoo's ORM (Object-Relational Mapping) API.


Here is an example of how you might automate the creation of a message in an Odoo Discuss channel using Python:


Copy code

from odoo import api, models


class MyAutomatedMessage(models.Model):

    _name = 'my.automated.message'


    @api.model

    def create_message(self):

        # Replace with the ID of the channel you want to post to

        channel_id = 1


        # The message you want to post

        message = "Hello, this is an automated message."


        # Create the message

        self.env['mail.channel'].browse(channel_id).message_post(body=message, message_type='comment', subtype='mail.mt_comment')

This code creates a new Odoo model called MyAutomatedMessage with a method create_message(). Inside the method, it uses the browse() method of the mail.channel model to get the specific channel by its ID. Then it uses the message_post() method to create the message in the channel with the specified message text, message type, and subtype.


This is a simple example, you can use odoo's scheduler to schedule the creation of the message, or you could use the Odoo's API to create a custom endpoint that can be used to trigger the message creation from an external source.


You should also make sure that you have the necessary access rights to create messages in the channel.


Please note that you need to get your Odoo Discuss 

0
อวตาร
ละทิ้ง
อวตาร
Paresh Wagh
คำตอบที่ดีที่สุด

Hi Nihat: You can do this by creating an automated action (Action to Do: Execute Python Code ) and call the message_post method on the channel.

0
อวตาร
ละทิ้ง
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!

สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!

ลงชื่อ
Related Posts ตอบกลับ มุมมอง กิจกรรม
DeprecationWarning: The longpolling-port is a deprecated alias to the gevent-port option, please use the latter แก้ไขแล้ว
odoo16features
อวตาร
อวตาร
อวตาร
อวตาร
อวตาร
5
ก.ย. 25
24520
How to Add wizard under print button inside the form view.
odoo16features
อวตาร
อวตาร
อวตาร
อวตาร
3
ส.ค. 25
3746
Automation active Boolean button
Automation
อวตาร
อวตาร
อวตาร
อวตาร
4
มิ.ย. 25
2510
How to add @api.onchange in _get_view() method odoo 16
odoo16features
อวตาร
อวตาร
1
พ.ค. 25
3639
get all partners which are internal users or portal users odoo16
odoo16features
อวตาร
อวตาร
1
เม.ย. 25
4483
คอมมูนิตี้
  • บทเรียน
  • เอกสารกำกับโปรแกรม
  • ฟอรั่ม
โอเพนซอร์ส
  • ดาวน์โหลด
  • Github
  • Runbot
  • การแปล
บริการ
  • โฮสติ้ง odoo.sh เซิร์ฟเวอร์
  • การสนับสนุน
  • อัปเกรด
  • การพัฒนาที่กำหนดเอง
  • การศึกษา
  • ค้นหานักบัญชี
  • ค้นหาพาร์ทเนอร์
  • ร่วมเป็นพาร์ทเนอร์
เกี่ยวกับเรา
  • บริษัทของเรา
  • ทรัพย์สินในรูปของเครื่องหมายการค้า
  • ติดต่อเรา
  • งาน
  • ระบบการจัดงานอีเวนต์
  • พอดแคสต์
  • บล็อก
  • ลูกค้า
  • กฎหมาย • ความเป็นส่วนตัว
  • ความปลอดภัย
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo เป็นชุดแอปธุรกิจแบบเปิดที่ครอบคลุมทุกความต้องการของบริษัทของคุณ อาธิ CRM eCommerce ระบบบัญชี ระบบสินค้าคงคลัง ระบบการขายหน้าร้าน โปรเจกต์ และ อีกมากมาย

ความเหนือกว่าอันเป็นเอกลักษณ์ของ Odoo คือการใช้งานที่ง่ายดายและผสานการทำงานอย่างสมบูรณ์แบบในเวลาเดียวกัน

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now