Repository
OCA/sale-blanket · module folder · Try on Runboat
Module version
1.1.3
Category
Sale
Folder size
0.64 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-blanket
Last tracking update
2026-08-11 17:30:53
Authors
Odoo Community Association (OCA), Acsone SA/NV
Maintainers
Odoo Community Association (OCA), Acsone SA/NV
Committers
Maksym Yankin, Weblate, OCA-git-bot, Raf Ven, oca-ci, adrip-s73, Gabriel Tricoire
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
A blanket order is a pre-agreement to sell a certain number of
quantities of products at a specific price. From a confirmed blanket
order, the users can create new sale orders at such price during the
blanket order validity period, until the blanket order expires, either
due to reaching the validity end date or exhausting all the quantities
of products.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
report_blanketorder report_blanketorder ir.ui.view qweb New
report_blanketorder_document report_blanketorder_document ir.ui.view qweb New
sale_blanket_order_line_form sale.blanket.order.line.form sale.blanket.order.line form New
sale_blanket_order_line_search sale.blanket.order.line.search sale.blanket.order.line search New
sale_blanket_order_line_tree sale.blanket.order.line.list sale.blanket.order.line list New
sale_config_settings_form_view res.config.settings.form (in sale_blanket_order) res.config.settings form Inherits sale.res_config_settings_view_form
view_blanket_order_form sale.blanket.order.form sale.blanket.order form New
view_blanket_order_search sale.blanket.order.search sale.blanket.order search New
view_blanket_order_tree sale.blanket.order.list sale.blanket.order list New
view_create_sale_order Create Sale Order sale.blanket.order.wizard form New
view_order_form sale.order.from.blanket.form sale.order form Inherits sale.view_order_form
view_order_form_disable_adding_lines sale.order.from.blanket.form - disable adding lines sale.order form Inherits sale.view_order_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (7)

New fields (1)
  • group_blanket_disable_adding_lines Boolean
    implied_group='sale_blanket_order.blanket_orders_disable_adding_lines' string='Disable adding more lines to SOs'
Public methods (0)

No public methods.

New fields (28)
  • amount_tax Monetary
    compute='_compute_amount_all' readonly=True store=True string='Taxes'
  • amount_total Monetary
    compute='_compute_amount_all' readonly=True store=True string='Total'
  • amount_untaxed Monetary
    compute='_compute_amount_all' readonly=True store=True string='Untaxed Amount' tracking=True
  • client_order_ref Char
    copy=False string='Customer Reference'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True
  • confirmed Boolean
    copy=False
  • currency_id Many2one → res.currency
    related='pricelist_id.currency_id' args: 'res.currency'
  • delivered_uom_qty Float
    compute='_compute_uom_qty' default=0.0 search='_search_delivered_uom_qty' string='Delivered quantity'
  • fiscal_position_id Many2one → account.fiscal.position
    check_company=True string='Fiscal Position' args: 'account.fiscal.position'
  • invoiced_uom_qty Float
    compute='_compute_uom_qty' default=0.0 search='_search_invoiced_uom_qty' string='Invoiced quantity'
  • line_count Integer
    compute='_compute_line_count' readonly=True string='Sale Blanket Order Line count'
  • line_ids One2many → sale.blanket.order.line
    copy=True string='Order lines' args: 'sale.blanket.order.line', 'order_id'
  • name Char
    copy=False default='Draft' readonly=True
  • note Text
    default=<expr>
  • ordered_uom_qty Float
    compute='_compute_uom_qty' default=0.0 search='_search_ordered_uom_qty' string='Ordered quantity'
  • original_uom_qty Float
    compute='_compute_uom_qty' default=0.0 search='_search_original_uom_qty' string='Original quantity'
  • partner_id Many2one → res.partner
    string='Partner' args: 'res.partner'
  • payment_term_id Many2one → account.payment.term
    string='Payment Terms' args: 'account.payment.term'
  • pricelist_id Many2one → product.pricelist
    required=True string='Pricelist' args: 'product.pricelist'
  • product_id Many2one → product.product
    related='line_ids.product_id' string='Product' args: 'product.product'
  • remaining_uom_qty Float
    compute='_compute_uom_qty' default=0.0 search='_search_remaining_uom_qty' string='Remaining quantity'
  • sale_count Integer
    compute='_compute_sale_count'
  • state Selection
    compute='_compute_state' copy=False selection=[('draft', 'Draft'), ('open', 'Open'), ('done', 'Done'), ('expired', 'Expired')] store=True
  • tag_ids Many2many → crm.tag
    column1='blanket_order_id' column2='tag_id' comodel_name='crm.tag' relation='sale_blanket_order_tag_rel' string='Tags'
  • team_id Many2one → crm.team
    change_default=True default=<expr> string='Sales Team' args: 'crm.team'
  • user_id Many2one → res.users
    string='Salesperson' args: 'res.users'
  • validity_date Date
  • validity_start_date Date
Public methods (7)
  • action_cancel(self)
  • action_confirm(self)
  • action_view_sale_blanket_order_line(self)
  • action_view_sale_orders(self)
  • expire_orders(self)
    @api.model
  • onchange_partner_id(self)
    @api.onchange('partner_id')
    Update the following fields when the partner is changed: - Pricelist - Payment term - Fiscal position
  • set_to_draft(self)

New fields (26)
  • company_id Many2one
    index=True precompute=True related='order_id.company_id' store=True
  • currency_id Many2one → res.currency
    related='order_id.currency_id' args: 'res.currency'
  • date_schedule Date
    string='Scheduled Date'
  • delivered_uom_qty Float
    compute='_compute_quantities' store=True string='Delivered quantity'
  • display_type Selection
    default=False help='Technical field for UX purpose.' args: [('line_section', 'Section'), ('line_note', 'Note')]
  • invoiced_uom_qty Float
    compute='_compute_quantities' store=True string='Invoiced quantity'
  • name Char
    tracking=True args: 'Description'
  • order_id Many2one → sale.blanket.order
    ondelete='cascade' required=True args: 'sale.blanket.order'
  • ordered_uom_qty Float
    compute='_compute_quantities' store=True string='Ordered quantity'
  • original_uom_qty Float
    default=1 digits='Product Unit of Measure' string='Original quantity'
  • partner_id Many2one
    related='order_id.partner_id' string='Customer'
  • payment_term_id Many2one
    related='order_id.payment_term_id' string='Payment Terms'
  • price_subtotal Monetary
    compute='_compute_amount' store=True string='Subtotal'
  • price_tax Float
    compute='_compute_amount' store=True string='Tax'
  • price_total Monetary
    compute='_compute_amount' store=True string='Total'
  • price_unit Float
    digits='Product Price' string='Price'
  • pricelist_id Many2one
    related='order_id.pricelist_id' string='Pricelist'
  • pricelist_item_id Many2one → product.pricelist.item
    comodel_name='product.pricelist.item' compute='_compute_pricelist_item_id'
  • product_id Many2one → product.product
    domain=[('sale_ok', '=', True)] string='Product' args: 'product.product'
  • product_uom Many2one → uom.uom
    string='Unit of Measure' args: 'uom.uom'
  • remaining_qty Float
    compute='_compute_quantities' store=True string='Remaining quantity in base UoM'
  • remaining_uom_qty Float
    compute='_compute_quantities' store=True string='Remaining quantity'
  • sale_lines One2many → sale.order.line
    copy=False readonly=True string='Sale order lines' args: 'sale.order.line', 'blanket_order_line'
  • sequence Integer
  • taxes_id Many2many → account.tax
    check_company=True comodel_name='account.tax' context={'active_test': False}
  • user_id Many2one
    related='order_id.user_id' string='Responsible'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_product(self)
    @api.onchange('product_id', 'original_uom_qty')
  • write(self, values)

New fields (3)
  • blanket_order_id Many2one → sale.blanket.order
    comodel_name='sale.blanket.order' default=<expr> readonly=True
  • line_ids One2many → sale.blanket.order.wizard.line
    default=<expr> string='Lines' args: 'sale.blanket.order.wizard.line', 'wizard_id'
  • sale_order_id Many2one → sale.order
    domain=[('state', '=', 'draft')] string='Purchase Order' args: 'sale.order'
Public methods (1)
  • create_sale_order(self)

New fields (13)
  • analytic_distribution Json
    related='blanket_line_id.analytic_distribution'
  • blanket_line_id Many2one → sale.blanket.order.line
    args: 'sale.blanket.order.line'
  • company_id Many2one → res.company
    related='blanket_line_id.company_id' string='Company' args: 'res.company'
  • currency_id Many2one → res.currency
    related='blanket_line_id.currency_id' args: 'res.currency'
  • date_schedule Date
    string='Scheduled Date'
  • partner_id Many2one → res.partner
    related='blanket_line_id.partner_id' string='Vendor' args: 'res.partner'
  • price_unit Float
    related='blanket_line_id.price_unit'
  • product_id Many2one → product.product
    related='blanket_line_id.product_id' string='Product' args: 'product.product'
  • product_uom Many2one → uom.uom
    related='blanket_line_id.product_uom' string='Unit of Measure' args: 'uom.uom'
  • qty Float
    required=True string='Quantity to Order'
  • remaining_uom_qty Float
    related='blanket_line_id.remaining_uom_qty'
  • taxes_id Many2many → account.tax
    related='blanket_line_id.taxes_id' args: 'account.tax'
  • wizard_id Many2one → sale.blanket.order.wizard
    args: 'sale.blanket.order.wizard'
Public methods (0)

No public methods.

New fields (2)
  • blanket_order_id Many2one → sale.blanket.order
    related='order_line.blanket_order_line.order_id' string='Origin blanket order' args: 'sale.blanket.order'
  • disable_adding_lines Boolean
    compute='_compute_disable_adding_lines'
Public methods (2)
  • action_confirm(self)
  • check_partner_id(self)
    @api.constrains('partner_id')

New fields (1)
  • blanket_order_line Many2one → sale.blanket.order.line
    compute='_compute_blanket_order_line' copy=False precompute=True store=True string='Blanket Order line' args: 'sale.blanket.order.line'
Public methods (3)
  • check_currency(self)
    @api.constrains('currency_id')
  • check_product_id(self)
    @api.constrains('product_id')
  • get_assigned_bo_line(self)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…