sale_blanket_agreement
This page combines editorial guidance with evidence extracted from the selected official branch. Always test the flow with your own permissions and configuration.
Purpose
The Sale Blanket Agreement Module manages long-term contracts with customers to sell a specific quantity of products with multiple orders over a period.
The analysis found 4 Python files, 12 XML files, 10 views, 11 actions, 1 menus, and 0 reports.
Functional user guide
Who should use it
This module is relevant to people responsible for sale blanket agreement processes, company configuration, and result review. Administrators should participate whenever dependencies, permissions, or sequences are introduced.
What you will be able to do
After configuration, you will be able to identify the records added by sale_blanket_agreement, execute actions in the correct state, and understand the information shared with other modules.
Requirements and preparation
Before activation, verify company, currency, users, and groups. Install and configure required dependencies first. When real data exists, rehearse activation and upgrades on a restored copy.
Activate dependencies first, review company configuration, and rehearse the complete workflow before production use.
Required dependencies
ir— must be installed and configured before testing this module.company— must be installed and configured before testing this module.product— must be installed and configured before testing this module.party— must be installed and configured before testing this module.currency— must be installed and configured before testing this module.sale— must be installed and configured before testing this module.
Optional integrations
- —
Recommended initial configuration
- Activate the module and sign in again to load menus and permissions.
- Review new company configuration options and defaults.
- Assign groups to test users using least privilege.
- Create small, verifiable master data before bulk imports.
- Run one complete scenario from draft to final state and inspect related records.
Module objects and concepts
- sale.blanket_agreement: groups 4 model(s), including
sale.blanket_agreement,sale.blanket_agreement.create_sale,sale.blanket_agreement.create_sale.start,sale.blanket_agreement.line. These records form the information users inspect or modify during the process. - sale.configuration: groups 2 model(s), including
sale.configuration,sale.configuration.sequence. These records form the information users inspect or modify during the process. - sale.line: groups 1 model(s), including
sale.line. These records form the information users inspect or modify during the process. - sale.sale: groups 1 model(s), including
sale.sale. These records form the information users inspect or modify during the process.
Typical workflow
- Select the correct company and date before creating a document.
- Complete master data before lines or details.
- Use form buttons for state changes; saving is not the same as validating or posting.
- Review warnings, totals, related documents, and traceability.
- Verify effects on dependent modules before closing the process.
Actions, states, and wizards
cancel— action or transition that starts cancel. Check permissions, current state, and related records before running it.close— action or transition that starts close. Check permissions, current state, and related records before running it.create_sale— action or transition that starts create sale. Check permissions, current state, and related records before running it.draft— action or transition that starts draft. Check permissions, current state, and related records before running it.run— action or transition that starts run. Check permissions, current state, and related records before running it.cancelled— action or transition that starts cancelled. Check permissions, current state, and related records before running it.closed— action or transition that starts closed. Check permissions, current state, and related records before running it.confirmed— action or transition that starts confirmed. Check permissions, current state, and related records before running it.quotation— action or transition that starts quotation. Check permissions, current state, and related records before running it.running— action or transition that starts running. Check permissions, current state, and related records before running it.sale.blanket_agreement.create_sale— wizard that collects data and performs sale › blanket agreement › create sale. Check permissions, current state, and related records before running it.
Controls before production
- Define who creates, reviews, confirms, cancels, and reads.
- Test closed periods, unauthorized users, and incomplete data.
- Verify numbering, currency, rounding, and time zone where applicable.
- Document error correction without direct database edits.
- Include its tables and files in backup and restore procedures.
Troubleshooting
- If a menu is missing, verify activation, module-list update, groups, and a new login session.
- If a field rejects a value, inspect its domain, company, state, and configured dependencies.
- If a button is hidden or disabled, check permissions and valid transitions; never change state with SQL.
- If results differ, reproduce a minimal case and compare related records before and after.
- Keep the full traceback, version, active modules, and minimal data needed to diagnose an error.
Developer guide
Architecture and extension points
The package contains 10 Python classes and declares or extends 8 models. It uses Char, Date, Float, Function, Many2Many, Many2One, MultiValue, One2Many, Selection. Developers should first determine whether a class creates a model or uses PoolMeta to extend one, preserve super() calls, and avoid duplicating dependency rules.
Registered or extended models
sale.blanket_agreementsale.blanket_agreement.create_salesale.blanket_agreement.create_sale.startsale.blanket_agreement.linesale.configurationsale.configuration.sequencesale.linesale.sale
Field types used
CharDateFloatFunctionMany2ManyMany2OneMultiValueOne2ManySelection
Detected classes and public methods
Classes: BlanketAgreement, BlanketAgreementClosingWarning, BlanketAgreementCreateSale, BlanketAgreementCreateSaleStart, BlanketAgreementLine, BlanketAgreementQuantityWarning, Configuration, ConfigurationSequence, Line, Sale
Methods: cancel(), chat_language(), check_unit(), close(), compute_unit_price(), confirm(), copy(), create_sale(), decorator(), default_blanket_agreement_sequence(), default_company(), default_currency(), default_start(), default_state(), do_create_sale(), draft(), full_number(), get_blanket_agreements(), get_processed_quantity(), get_rec_name(), get_sale(), get_sale_blanket_agreement_states(), get_sale_line(), is_same_uom_category(), is_valid_product_for_blanket_agreement(), multivalue_model(), on_change_blanket_agreement_line(), on_change_customer(), on_change_product(), on_change_with_agreement_state(), on_change_with_amount(), on_change_with_company(), on_change_with_currency(), on_change_with_product_uom_category(), on_change_with_remaining_quantity(), order_number(), quantity_for_blanket_agreement(), quote(), remainig_quantity_for_sale(), run(), search_blanket_agreements(), search_rec_name(), set_date(), set_number(), validate_fields(), view_attributes()
Code map
Detected 4 Python files, 12 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.
__init__.pydoc/conf.pyexceptions.pymessage.xmlproduct.xmlsale.pysale.xmlview/product_list_agreement_line.xmlview/sale_blanket_agreement_create_sale_start_form.xmlview/sale_blanket_agreement_form.xmlview/sale_blanket_agreement_line_form.xmlview/sale_blanket_agreement_line_list.xmlview/sale_blanket_agreement_list.xmlview/sale_configuration_form.xmlview/sale_line_form.xmlview/sale_line_list.xml
Test plan
- Activation on an empty database and upgrade from the previous revision.
- Create, update, copy, and delete according to state and access rights.
- Every button, transition, and wizard with valid and invalid scenarios.
- Applicable multi-company rules, translations, time zones, and currencies.
- Combined installation with required and optional dependencies.
- Backup and restore of records, attachments, and generated reports.
Compatibility and upgrades
Keep server and modules on series 8.0. Before upgrading, compare tryton.cfg, __register__ migrations, state changes, XML IDs, and permissions. A successful build does not replace a rehearsed migration or functional data reconciliation.
Official documentation evidence
Topics found: Design · Sale Blanket Agreement · Wizard · Create Sale · Sale Blanket Agreement Module
-
- doc/design.rst: The Sale Blanket Agreement Module introduces the following concepts:
-
- doc/index.rst: The Sale Blanket Agreement Module manages long-term contracts with customers to sell a specific quantity of products with multiple orders over a period.