Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте 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:

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

Send email for sign request through API

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
emailapixmlrpctypeerrorsign
3 Відповіді
6101 Переглядів
Аватар
Juan Botero Tech

I'm trying to send an email with sign request with API XMLM/RPC in Python client


For this, I implement 5 calls to the API:

1. Upload file with Method sign.template and method upload_template, send the PDF file and got the Document ID

2. Update contract sign, update pdf file with the field or fields to fill with user data (name, company sign..).

3. Create the email request with message data (receiver, pdf file, text message).

4. Some method required to check the email before send:  

    Model sign.send.request method: read, and Model sign.send.request.signer method read

5. Send email with model sign.send.request and method send_request with args the email template created before, like this:

request_sign = api.execute_kw(database, uid, api_key, "sign.send.request","send_request", [template_email_id])

template created before, like this: All steps executes well, but the last one gives me this:
 

xmlrpc.client.Fault:
...
line 534, in dump_nil\n raise TypeError("cannot marshal None unless allow_none is enabled")\nTypeError: cannot marshal None unless allow_none is enabled\n'>

I declare the connection with allow_none = True:

api = client.ServerProxy("%s/xmlrpc/2/object" % self.url, allow_none=True)

I don't know what Am I doing wrong with the method call.

0
Аватар
Відмінити
Juan Botero Tech
Автор

Thank you for your answers.

I migrate the code to use OdooRPC module and can prepare the email to send later.

# Prepare email request

sign_email =self.odoo.env['sign.send.request']

email_id = sign_email.create(request_fields)

request_sign = sign_email.send_request(email_id)

The email is created in Odoo but is not delivered to the recipients.

Christopher DATO

You have to setup your Outgoing Mail Server

Аватар
loic m.
Найкраща відповідь

Hi,

I'm working on the same kind of project but with API XMLM/RPC in PHP client.

I manage to create partners, upload documents, create sign template and email template but I'm stuck on the creation of signers.

When I try with $models->execute_kw($db, $uid, $password, 'sign.send.request.signer', 'create', array(array('role_id'=>'2','partner_id'=>'7')));

It returns the following error :

TypeError: SignSendRequestSigner.create() missing 1 required positional argument: \'vals_list\'

I've check that partner_id 7 exists and it's the only required field along with role_id

Does anybody knows what am I doing wrong ?

Regards,

0
Аватар
Відмінити
loic m.

Ok, I found the right syntax / missing positional argument to create signer_ids :

$signer_ids = array([0, 'client_signature', ['role_id'=> 2, 'partner_id'=> $client_id]],[0, 'employee_signature', ['role_id'=> 3, 'partner_id'=> $employee_id]]);

Аватар
Ashish Hirpara
Найкраща відповідь

It looks like the issue is with the send_request method in the sign.send.request model. The error message indicates that the method is trying to marshal a None value, but the allow_none option is not enabled.

To fix this issue, you can try enabling the allow_none option when calling the send_request method. You can do this by passing the allow_none=True option as an argument to the send_request method, like this:

request_sign = api.execute_kw(database, uid, api_key, "sign.send.request", "send_request", [template_email_id], allow_none=True)

Alternatively, you can try setting the allow_none option to True when creating the ServerProxy object, like this:

api = client.ServerProxy("%s/xmlrpc/2/object" % self.url, allow_none=True)
request_sign = api.execute_kw(database, uid, api_key, "sign.send.request", "send_request", [template_email_id])

Either of these approaches should fix the issue and allow the send_request method to be called successfully.

0
Аватар
Відмінити
Аватар
Jainesh Shah(Aktiv Software)
Найкраща відповідь

Hi @Juan Botero Tech

Hope you are doing well

Even if the allow_none is True if the method that you are calling doesn't return anything or None it will throw the error.
As a workaround, inherit the method and add return True at the end after calling super.

I hope this will be helpful.

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

0
Аватар
Відмінити
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Реєстрація
Related Posts Відповіді Переглядів Дія
I want to sent invoice to the coustomer email using external api Вирішено
email external api xmlrpc
Аватар
Аватар
1
лип. 24
5094
XML-RPC API search_read method 100 records' limitation
api xmlrpc
Аватар
Аватар
Аватар
3
січ. 23
9424
XMLRPC API Search and Read - How to Supply Multiple Filters Вирішено
api xmlrpc
Аватар
1
бер. 22
6533
(\'Error, a partner cannot follow twice the same object.\', None)\n'>
api xmlrpc
Аватар
Аватар
1
лют. 22
6680
Logging XML RPC requests and responses into another log file Вирішено
api xmlrpc
Аватар
Аватар
1
лип. 20
10383
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • 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, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція 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