SmartERP Documentation An Ashewa Technology Solutions Platform

Models and fields

The technical names of every model the social modules define, and their main fields.

Technical names for developers, for odoo-bin shell, and for reading the database.

Social Media Marketing Automation#

social.media.account#

Inherits mail.thread. Ordered by name.

FieldTypeNotes
nameCharRequired, tracked.
platformSelectionfacebook, instagram, twitter, linkedin, tiktok, youtube. Required, tracked.
handle, profile_urlChar
access_tokenCharManager group only.
company_idMany2one res.companyDefault: current company.
active, image, color
test_modeBooleanDefault True, tracked.
stateSelectiondisconnected (default), connected. Tracked.
post_ids, post_countOne2many, Integer
char_limitIntegerComputed from platform, stored.

Methods: action_connect, action_disconnect, action_view_posts, and _api_publish(post), the override point for real integrations.

social.media.post#

Inherits mail.thread, mail.activity.mixin. Ordered by scheduled_date desc, id desc.

FieldTypeNotes
nameCharComputed from the first 60 characters of message; editable, stored.
messageTextRequired, tracked.
image, link_urlImage, Char
template_id, hashtag_idsMany2one, Many2many
account_idMany2oneRequired, tracked, cascade delete.
platform, char_limit, company_idrelated to the accountplatform and company_id stored.
campaign_idMany2oneTracked.
scheduled_date, published_dateDatetimepublished_date read-only.
stateSelectiondraft, pending_approval, scheduled, published, failed, cancelled.
approved_by, approved_date, error_messageRead-only.
ai_brief, ai_content_statusText, SelectionStatus: none, requested, received, failed.
message_length, over_char_limitcomputed
like_count, comment_count, share_count, click_countIntegerRead-only.
engagement_countIntegerSum of the four, stored.

Methods: action_submit_for_approval, action_schedule, action_approve, action_reject, action_reset_to_draft, action_cancel, action_publish_now, action_request_ai_content, action_duplicate, action_insert_hashtags, _publish, and _cron_publish_scheduled_posts.

Others#

ModelPurposeMain fields
social.media.campaignGroups posts. Inherits mail.thread, mail.activity.mixin.name, user_id, company_id, date_start, date_end, description (Html), state (draft, in_progress, done, cancelled), post_ids, post_count, active
social.media.templateReusable content.name, message, image, link_url, hashtag_ids, platform, active
social.media.hashtagThe library. Unique name.name, color, active
social.media.post.composeTransient wizard.template_id, message, image, link_url, hashtag_ids, campaign_id, account_ids, scheduled_date
social.media.automation.settingsTransient screen over two system parameters.n8n_ai_webhook_url, api_key

AI Growth Workforce#

social.ai.agent#

Inherits mail.thread. Ordered by sequence, name. Unique (name, company_id).

FieldTypeNotes
name, sequence, active
role_titleCharShown as Role.
categorySelectionsales, marketing, content, support, brand, intelligence.
description, responsibilitiesTextOne responsibility per line.
stateSelectiondraft (Not Deployed), active, paused.
autonomy_levelSelectionapproval_required, assisted, semi_autonomous, autonomous. Default approval_required.
autonomy_explanationCharComputed.
max_posts_per_dayIntegerDefault 10. 0 means no limit. Must not be negative.
requires_approval_with_imageBooleanDefault True.
odoo_model_access, channel_ids_textCharDeclarative only.
activity_log_idsOne2many
post_count, pending_approval_count, activity_countIntegerComputed.
company_idMany2oneRequired.

Methods: action_activate, action_pause, action_view_activity, check_can_publish(post) returning (allowed, reason), _autonomy_at_least(level), _posts_published_today().

social.ai.activity#

Ordered newest first. Created only through log(), which uses elevated rights.

FieldNotes
agent_idSet null on delete.
agent_name_snapshotName at write time.
post_idSet null on delete.
action_typegenerate, submit, approve, reject, schedule, publish, publish_blocked, publish_failed, autonomy_change, sync.
trigger, data_used, action_taken, resultText describing the event.
decisionRequired.
approval_statusnot_required (default), auto_approved, human_approved, blocked.
autonomy_at_timeAutonomy when written.
user_id, odoo_record, company_id

telegram.post (extended)#

The base module's post model. This module adds:

FieldNotes
stateAdds pending_approval, approved, scheduled, failed, cancelled around the base module's draft and posted.
ai_agent_idHandled By, tracked.
is_ai_generatedNot copied on duplicate.
approved_by_id, approved_date, rejection_reason, failure_reasonRead-only, not copied.
ai_activity_ids, ai_activity_count
char_count, char_limit_warningComputed. Limits: X 280, Instagram 2,200, Telegram 4,096.
ai_brief, ai_content_status, ai_error_messageStatus: none, requested, received, failed.

Methods: action_submit_for_approval, action_approve, action_reject, action_schedule, action_reset_to_draft, action_cancel, action_publish_post (wraps the base publisher behind _check_publish_allowed), action_request_ai_content, apply_ai_content, _cron_publish_scheduled_posts, _cron_update_views_safe.

SmartERP Documentation#

ModelPurpose
smarterp.doc.sectionA section of the site. name, name_am, slug (unique), sequence, summary, summary_am, is_published, source, source_module, page_ids.
smarterp.doc.pageA page. name, name_am, slug (unique per section), section_id, sequence, summary, summary_am, body_md, body_md_am, is_published, source (file, manual), source_module, source_path.

See How it works.

Last updated: 2026-10-16