Repository
OCA/sale-workflow · module folder · Try on Runboat
Module version
1.6.0
Category
Sales Management
Folder size
1.1 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-workflow
Last tracking update
2026-08-07 09:06:23
Authors
Odoo Community Association (OCA), Agile Business Group, AvanzOSC, Tecnativa, Grupo Vermon, Niboo
Maintainers
Odoo Community Association (OCA), Agile Business Group, AvanzOSC, Tecnativa, Grupo Vermon, Niboo
Committers
JordiMForgeFlow, Maksym Yankin, Weblate, Franco Leyes, OCA-git-bot, oca-ci, r.perez
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
website_sale_order_type
Description
This module adds a typology for the sales orders. In each different
type, you can define, invoicing and refunding journal, a warehouse, a
stock route, a sequence, the shipping policy, the invoicing policy, a
payment term, a pricelist and an incoterm.

You can see sale types as lines of business.

You are able to select a sales order type by partner so that when you
add a partner to a sales order it will get the related info to it.

When no partner or context default applies, the first available sale
order type by sequence is used as the default.

Additionally, it adds a warning message to notify users when there is a mismatch between the partner's default pricelist
and the effective pricelist set by the sales order type. This ensures clarity when creating sales orders, as the
effective pricelist (determined by the sales order type) will take precedence over the partner's default pricelist.
The warning is only visible for companies without a parent and when there is a mismatch between the two pricelists.

![Pricelist Conflict Warning Note](../static/description/pricelist_conflict_warning_note.png)

Code Analysis

Views touched (13)
XML IDNameModelTypeStatus
res_config_settings_view_form res.config.settings.view.form res.config.settings form Inherits sale.res_config_settings_view_form
res_partner_sale_type_form_view res.partner.sale_type.form res.partner form Inherits base.view_partner_form
sot_invoice_form account.move.form.sot account.move form Inherits account.view_move_form
sot_invoice_list account.invoice.list.sot account.move list Inherits account.view_invoice_tree
sot_invoice_search account.invoice.search.sot account.move search Inherits account.view_account_invoice_filter
sot_sale_order_type_form_view sale.order.type.form.view sale.order.type form New
sot_sale_order_type_search_view sale.order.type.search.view sale.order.type search New
sot_sale_order_type_tree_view sale.order.type.list.view sale.order.type list New
sot_view_order_form sale.order.form sale.order form Inherits sale.view_order_form
sot_view_order_list sale.order.list.sot sale.order list Inherits sale.view_order_tree
view_account_invoice_report_search account.invoice.report search Inherits account.view_account_invoice_report_search
view_order_product_search sale.report search Inherits sale.view_order_product_search
view_sales_order_filter sale.order Inherits sale.view_sales_order_filter
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (11)

New fields (1)
  • sale_type_id Many2one → sale.order.type
    comodel_name='sale.order.type' string='Sale Order Type'
Public methods (0)

No public methods.

New fields (1)
  • sale_type_id Many2one → sale.order.type
    comodel_name='sale.order.type' compute='_compute_sale_type_id' copy=True ondelete='restrict' precompute=True readonly=False store=True string='Sale Type'
Public methods (0)

No public methods.

New fields (1)
  • sale_order_type_required Boolean
    default=True help='If checked, the sale orders will require a type.'
Public methods (0)

No public methods.

New fields (1)
  • sale_order_type_required Boolean
    readonly=False related='company_id.sale_order_type_required'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • effective_pricelist_id Many2one → product.pricelist
    comodel_name='product.pricelist' related='sale_type.pricelist_id' string='Sale Effective Pricelist'
  • sale_type Many2one → sale.order.type
    comodel_name='sale.order.type' company_dependent=True copy=True string='Sale Order Type'
Public methods (1)
  • copy_data(self, default=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • incoterm Many2one
    compute='_compute_incoterm' readonly=False store=True
  • order_type_required Boolean
    related='company_id.sale_order_type_required'
  • picking_policy Selection
    compute='_compute_picking_policy' readonly=False store=True
  • type_id Many2one → sale.order.type
    check_company=True comodel_name='sale.order.type' compute='_compute_sale_type_id' copy=True ondelete='restrict' precompute=True readonly=False store=True string='Type'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)
    A sale type could have a different order sequence, so we could need to change it accordingly

New fields (1)
  • route_ids Many2many
    compute='_compute_route_ids' precompute=True readonly=False store=True
Public methods (0)

No public methods.

New fields (16)
  • active Boolean
    default=True
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> store=True
  • description Text
    translate=True
  • incoterm_id Many2one → account.incoterms
    comodel_name='account.incoterms' string='Incoterm'
  • journal_id Many2one → account.journal
    check_company=True comodel_name='account.journal' domain="[('type', '=', 'sale')]" string='Billing Journal'
  • name Char
    required=True translate=True
  • payment_term_id Many2one → account.payment.term
    check_company=True comodel_name='account.payment.term' string='Payment Term'
  • picking_policy Selection
    default=<expr> selection=<expr> string='Shipping Policy'
  • pricelist_id Many2one → product.pricelist
    check_company=True comodel_name='product.pricelist' string='Pricelist'
  • quotation_validity_days Integer
    string='Quotation Validity (Days)'
  • route_ids Many2many → stock.route
    check_company=True domain=[('sale_selectable', '=', True)] ondelete='restrict' string='Routes' args: 'stock.route'
  • sequence Integer
    default=10
  • sequence_id Many2one → ir.sequence
    comodel_name='ir.sequence' copy=False domain=<expr> string='Entry Sequence'
  • team_id Many2one → crm.team
    check_company=True comodel_name='crm.team' string='Sales Team'
  • user_id Many2one → res.users
    check_company=True comodel_name='res.users' domain=<expr> string='Salesperson'
  • warehouse_id Many2one → stock.warehouse
    check_company=True comodel_name='stock.warehouse' string='Warehouse'
Public methods (0)

No public methods.

New fields (1)
  • type_id Many2one → sale.order.type
    comodel_name='sale.order.type' string='Type'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…