Skip to content
Health
87/100
good
  • Security22/25
    1 minor finding
  • Activity25/25
    Last human commit 1 month ago
  • Required by15/25
    1 module depends on it
  • Maturity25/25
    In 9 Odoo series since 12.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
1.23 MB
Module directory on disk
Code analysis 0 migration notes 8 models 4 views 1 HTTP endpoint

Description

Allows users to send documents by post

Dependencies

Odoo dependencies
odoo/odoo:
- iap
- web
- bus
Python dependencies
None
System dependencies
None
Required by
snailmail_account

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 4

XML IDNameModelTypeStatus
minimal_layout minimal_layout ir.ui.view qweb Inherits web.minimal_layout
report_layout report_layout ir.ui.view qweb Inherits web.report_layout
snailmail_letter_form snailmail.letter.form snailmail.letter form New
snailmail_letter_list snailmail.letter.list snailmail.letter list New

HTTP endpoints 1

Route(s)HandlerAuthTypeMethodsFlags
/webhook/snailmail/1/<string:event_type> SnailmailWebhookController.snailmail_webhook public http ALL csrf off sudo

Models touched 8

New fields (0)

No new fields.

Public methods (2)
  • get_paperformat(self)
  • retrieve_attachment(self, record)

New fields (3)
  • letter_ids One2many → snailmail.letter
    comodel_name='snailmail.letter' inverse_name='message_id'
  • message_type Selection
    ondelete={'snailmail': <expr>} selection_add=[('snailmail', 'Snailmail')]
  • snailmail_error Boolean
    compute='_compute_snailmail_error' search='_search_snailmail_error' string='Snailmail message in error'
Public methods (2)
  • cancel_letter(self)
  • send_letter(self)

New fields (3)
  • failure_type Selection
    selection_add=[('sn_credit', 'Snailmail Credit Error'), ('sn_trial', 'Snailmail Trial Error'), ('sn_price', 'Snailmail No Price Available'), ('sn_fields', 'Snailmail Missing Required Fields'), ('sn_format', 'Snailmail Format Error'), ('sn_error', 'Snailmail Unknown Error'), ('sn_undeliverable', 'Snailmail Undeliverable')]
  • letter_id Many2one → snailmail.letter
    index='btree_not_null' ondelete='cascade' string='Snailmail Letter' args: 'snailmail.letter'
  • notification_type Selection
    ondelete={'snail': 'cascade'} selection_add=[('snail', 'Snailmail')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • notify_cancel_by_type(self, notification_type)
    @api.model

New fields (3)
  • snailmail_color Boolean
    default=True
  • snailmail_cover Boolean
    default=False string='Add a Cover Page'
  • snailmail_duplex Boolean
    default=False string='Both sides'
Public methods (0)

No public methods.

New fields (3)
  • snailmail_color Boolean
    readonly=False related='company_id.snailmail_color' string='Print In Color'
  • snailmail_cover Boolean
    readonly=False related='company_id.snailmail_cover' string='Add a Cover Page'
  • snailmail_duplex Boolean
    readonly=False related='company_id.snailmail_duplex' string='Print Both sides'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • country_name(self)
    @property
  • write(self, vals)

New fields (25)
  • attachment_fname Char
    related='attachment_id.name' args: 'Attachment Filename'
  • attachment_id Many2one → ir.attachment
    index='btree_not_null' ondelete='cascade' string='Attachment' args: 'ir.attachment'
  • attachment_raw Binary
    related='attachment_id.raw' args: 'Document'
  • city Char
    args: 'City'
  • color Boolean
    default=<expr> string='Color'
  • company_id Many2one → res.company
    default=<expr> readonly=True required=True string='Company' args: 'res.company'
  • country_id Many2one → res.country
    string='Country' args: 'res.country'
  • cover Boolean
    default=<expr> string='Cover Page'
  • duplex Boolean
    default=<expr> string='Both side'
  • error_code Selection
    string='Error' args: <expr>
  • info_msg Html
    args: 'Information'
  • letter_uid Char
    args: 'Snailmail letter ID'
  • message_id Many2one → mail.message
    index='btree_not_null' string='Snailmail Status Message' args: 'mail.message'
  • model Char
    required=True args: 'Model'
  • notification_ids One2many → mail.notification
    args: 'mail.notification', 'letter_id', 'Notifications'
  • partner_id Many2one → res.partner
    required=True string='Recipient' args: 'res.partner'
  • reference Char
    compute='_compute_reference' readonly=True store=False string='Related Record'
  • report_template Many2one → ir.actions.report
    args: 'ir.actions.report', 'Optional report to print and attach'
  • res_id Integer
    required=True args: 'Document ID'
  • state Selection
    copy=False default='pending' help="When a letter is created, the status is 'Pending'.\nIf the letter is correctly sent to provider, the status goes in 'process',\nIf the provider confirms the letter is delivered, the status goes in 'Sent'.\nIf not sent or delivered, it will got in state 'Error' and the error message will be displayed in the field 'Error Message'." readonly=True required=True args: [('pending', 'In Queue'), ('process', 'Processing'), ('sent', 'Sent'), ('error', 'Error'), ('canceled', 'Cancelled')], 'Status'
  • state_id Many2one → res.country.state
    string='State' args: 'res.country.state'
  • street Char
    args: 'Street'
  • street2 Char
    args: 'Street2'
  • user_id Many2one → res.users
    args: 'res.users', 'Sent by'
  • zip Char
    args: 'Zip'
Public methods (4)
  • cancel(self)
  • create(self, vals_list)
    @api.model_create_multi
  • snailmail_print(self)
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…