Subscription management
subscription_oca · OCA/contract
Health
80/100
good
-
Security25/25No findings
-
Activity25/25Human commit this month
-
Required by5/250 modules depend on it
-
Maturity25/25In 6 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.86 MB
Module directory on disk
Code analysis
0 migration notes
13 models
17 views
0 HTTP endpoints
Description
This module allows creating subscriptions that generate recurring invoices or orders. It also enables the sale of products that generate subscriptions.
Subscriptions can be paused and resumed, so they can be put on hold without being closed; the recurring cron skips paused subscriptions and can resume them automatically on a configured date.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 17
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
close_reason_wizard_view |
close.reason.wizard.view | close.reason.wizard | form | New |
pause_subscription_wizard_view |
sale.subscription.pause.wizard.form | sale.subscription.pause.wizard | form | New |
product_template_form_view |
product.template.sub.form | product.template | form | Inherits product.product_template_form_view |
res_partner_view_form |
res.partner.form | res.partner | form | Inherits base.view_partner_form |
sale_subscription_form |
sale.subscription.form | sale.subscription | form | New |
sale_subscription_kanban |
sale.subscription.kanban | sale.subscription | kanban | New |
sale_subscription_template_form |
sale.subscription.template.form | sale.subscription.template | form | New |
sale_subscription_template_tree |
sale.subscription.template.list | sale.subscription.template | list | New |
sale_subscription_tree |
sale.subscription.list | sale.subscription | list | New |
view_move_form |
account.move | form | Inherits account.view_move_form | |
view_product_suscribable_filter |
product.suscribable.filter | product.template | search | New |
view_sale_order_form |
view.sale_order.form | sale.order | form | Inherits sale.view_order_form |
view_sale_order_pending_filter |
sale.order.pending.filter | sale.subscription | search | New |
view_sale_subscription_tag_tree |
view.sale.subscription.tag.list | sale.subscription.tag | list | New |
view_subscription_close_reason_tree |
view.subscription.close.reason.list | sale.subscription.close.reason | list | New |
view_subscription_stage_form |
view.subscription.stage.form | sale.subscription.stage | form | New |
view_subscription_stage_tree |
view.subscription.stage.list | sale.subscription.stage | list | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 13
New fields (1)
-
subscription_idMany2one → sale.subscriptioncomodel_name='sale.subscription'
-
action_open_subscription(self)
New fields (1)
-
close_reason_idMany2one → sale.subscription.close.reasoncomodel_name='sale.subscription.close.reason'string='Reason'
-
button_confirm(self)
New fields (2)
-
subscribableBooleanstring='Subscribable product' -
subscription_template_idMany2one → sale.subscription.templatecomodel_name='sale.subscription.template'string='Subscription template'
No public methods.
New fields (2)
-
subscription_countIntegercompute='_compute_subscription_count'required=False -
subscription_idsOne2many → sale.subscriptioncomodel_name='sale.subscription'inverse_name='partner_id'string='Subscriptions'
-
action_view_subscription_ids(self)
New fields (3)
-
order_subscription_idMany2one → sale.subscriptioncomodel_name='sale.subscription'string='Subscription' -
subscription_idsOne2many → sale.subscriptioncomodel_name='sale.subscription'inverse_name='sale_order_id'string='Subscriptions' -
subscriptions_countIntegercompute='_compute_subscriptions_count'
-
action_confirm(self)Create a subscription per template from the Order's products -
action_view_subscriptions(self) -
create_subscription(self, lines, subscription_tmpl) -
get_next_interval(self, type_interval, interval) -
group_subscription_lines(self)Group Sale Order Lines by their product's subscription template
New fields (0)
No new fields.
Public methods (1)-
get_subscription_line_values(self)
New fields (40)
-
account_invoice_ids_countIntegercompute='_compute_account_invoice_ids_count'string='Invoice Count' -
activeBooleandefault=True -
amount_taxMonetarycompute='_compute_total'store=True -
amount_totalMonetarycompute='_compute_total'store=True -
close_reason_idMany2one → sale.subscription.close.reasoncomodel_name='sale.subscription.close.reason' -
codeChardefault=<expr>string='Reference' -
colorIntegerargs: 'Color Index' -
company_idMany2one → res.companydefault=<expr>index=Truerequired=True args: 'res.company' -
crm_team_idMany2one → crm.teamcomodel_name='crm.team'string='Sale team' -
currency_idMany2onedepends=['pricelist_id']ondelete='restrict'related='pricelist_id.currency_id'store=True -
dateDatecompute='_compute_rule_boundary'readonly=Falsestore=Truestring='Finish date' -
date_startDatedefault=date.today()string='Start date' -
descriptionText -
fiscal_position_idMany2one → account.fiscal.positioncheck_company=Truedomain="[('company_id', '=', company_id)]" args: 'account.fiscal.position' -
imageBinaryrelated='user_id.image_512'store=True args: 'Image' -
in_progressBooleandefault=Falsestring='In progress' -
invoice_idsOne2many → account.movecomodel_name='account.move'inverse_name='subscription_id'string='Invoices' -
is_pausedBooleancopy=Falsehelp='When ticked, the recurring cron will skip this subscription until it is resumed manually or until `paused_until` is reached.'index='btree_not_null'string='Paused'tracking=True -
journal_idMany2one → account.journalcomodel_name='account.journal' -
nameCharcompute='_compute_name'store=True -
partner_idMany2one → res.partnercomodel_name='res.partner'index=Truerequired=True -
partner_invoice_idMany2one → res.partnercomodel_name='res.partner'compute='_compute_partner_address_ids'help="Address the recurring invoices are addressed to. Defaults to the customer's invoice address."readonly=Falsestore=Truestring='Invoice address' -
partner_shipping_idMany2one → res.partnercomodel_name='res.partner'compute='_compute_partner_address_ids'help="Delivery address used on the recurring invoices and orders. Defaults to the customer's delivery address."readonly=Falsestore=Truestring='Delivery address' -
paused_untilDatecopy=Falsehelp='If set, the cron will automatically resume this subscription on or after this date.'string='Resume on'tracking=True -
pricelist_idMany2one → product.pricelistcomodel_name='product.pricelist'required=True -
recurring_next_dateDatedefault=date.today()string='Next invoice date' -
recurring_rule_boundaryBooleancompute='_compute_rule_boundary'store=Truestring='Boundary' -
recurring_totalMonetarycompute='_compute_total'store=Truestring='Recurring price' -
sale_order_idMany2one → sale.ordercomodel_name='sale.order'string='Origin sale order' -
sale_order_idsOne2many → sale.ordercomodel_name='sale.order'inverse_name='order_subscription_id'string='Orders' -
sale_order_ids_countIntegercompute='_compute_sale_order_ids_count'string='Sale orders' -
sale_subscription_line_idsOne2many → sale.subscription.linecomodel_name='sale.subscription.line'inverse_name='sale_subscription_id' -
sequenceInteger -
stage_idMany2one → sale.subscription.stagecomodel_name='sale.subscription.stage'group_expand='_read_group_stage_ids'store=Truetracking=True -
stage_typeSelectionrelated='stage_id.type' -
tag_idsMany2many → sale.subscription.tagcomodel_name='sale.subscription.tag'string='Tags' -
template_idMany2one → sale.subscription.templatecomodel_name='sale.subscription.template'required=Truestring='Subscription template' -
termsTextcompute='_compute_terms'readonly=Falsestore=Truestring='Terms and conditions' -
to_renewBooleandefault=Falsestring='To renew' -
user_idMany2one → res.userscomodel_name='res.users'default=<expr>string='Commercial agent'
-
action_close_subscription(self) -
action_open_pause_wizard(self) -
action_pause(self, paused_until=None) -
action_resume(self, automatic=False) -
action_start_subscription(self) -
action_view_account_invoice_ids(self) -
action_view_sale_order_ids(self) -
calculate_recurring_next_date(self, start_date) -
close_subscription(self, close_reason_id=False) -
create(self, vals_list)@api.model_create_multi -
create_invoice(self) -
create_sale_order(self) -
cron_subscription_management(self)@api.model -
generate_invoice(self) -
manual_invoice(self) -
onchange_partner_id(self)@api.onchange('partner_id') -
onchange_partner_id_fpos(self)@api.onchange('partner_id', 'company_id') -
write(self, values)
New fields (1)
-
nameCharrequired=True
No public methods.
New fields (12)
-
amount_tax_line_amountFloatcompute='_compute_subtotal'store=Truestring='Taxes Amount' -
company_idMany2oneindex=Truerelated='sale_subscription_id.company_id'store=Truestring='Company' -
currency_idMany2one → res.currencyreadonly=Truerelated='sale_subscription_id.currency_id'store=True args: 'res.currency' -
discountFloatcompute='_compute_discount'readonly=Falsestore=Truestring='Discount (%)' -
nameCharcompute='_compute_name'readonly=Falsestore=Truestring='Description' -
price_subtotalMonetarycompute='_compute_subtotal'readonly=Truestore=Truestring='Subtotal' -
price_totalMonetarycompute='_compute_subtotal'readonly=Truestore=Truestring='Total' -
price_unitFloatcompute='_compute_price_unit'readonly=Falsestore=Truestring='Unit price' -
product_idMany2one → product.productcomodel_name='product.product'domain=[('sale_ok', '=', True)] -
product_uom_qtyFloatdefault=1.0string='Quantity' -
sale_subscription_idMany2one → sale.subscriptioncomodel_name='sale.subscription'string='Subscription' -
tax_idsMany2many → account.taxcolumn1='subscription_line_id'column2='tax_id'comodel_name='account.tax'compute='_compute_tax_ids'readonly=Falserelation='subscription_line_tax'store=Truestring='Taxes'
No public methods.
New fields (1)
-
paused_untilDatehelp='Optional date on which the subscription is automatically resumed by the cron. Leave empty to pause indefinitely.'string='Resume on'
-
button_confirm(self)
New fields (6)
-
descriptionTexttranslate=True -
foldBooleanstring='Kanban folded' -
in_progressBooleandefault=Falsestring='In progress' -
nameCharrequired=Truetranslate=True -
sequenceInteger -
typeSelectiondefault='pre' args: [('draft', 'Draft'), ('pre', 'Ready to start'), ('in_progress', 'In progress'), ('post', 'Closed')]
No public methods.
New fields (1)
-
nameCharrequired=True args: 'Tag name'
No public methods.
New fields (13)
-
codeChar -
descriptionTextstring='Terms and conditions' -
invoice_mail_template_idMany2one → mail.templatecomodel_name='mail.template'domain="[('model', '=', 'account.move')]"string='Invoice Email' -
invoicing_modeSelectiondefault='draft'selection=[('draft', 'Draft'), ('invoice', 'Invoice'), ('invoice_send', 'Invoice & send'), ('sale_and_invoice', 'Sale order & Invoice')]string='Invoicing mode' -
nameCharrequired=True -
product_idsOne2many → product.templatecomodel_name='product.template'inverse_name='subscription_template_id'string='Products' -
product_ids_countIntegercompute='_compute_product_ids_count'string='product_ids' -
recurring_intervalIntegerdefault=1string='Repeat every' -
recurring_rule_boundarySelectiondefault='unlimited'string='Duration' args: [('unlimited', 'Forever'), ('limited', 'Fixed')] -
recurring_rule_countIntegerdefault=1string='Rule count' -
recurring_rule_typeSelectiondefault='months'string='Recurrence' args: [('days', 'Day(s)'), ('weeks', 'Week(s)'), ('months', 'Month(s)'), ('years', 'Year(s)')] -
subscription_countIntegercompute='_compute_subscription_count'string='subscription_ids' -
subscription_idsOne2many → sale.subscriptioncomodel_name='sale.subscription'inverse_name='template_id'string='Subscriptions'
-
action_view_product_ids(self) -
action_view_subscription_ids(self)
Loading…
Loading…
Loading…
Loading…
Loading…