Sourcing with Framework Agreements

framework_agreement_sourcing
REPOSITORY
REPOSITORYOCA/vertical-ngo
GIT
GIThttps://github.com/OCA/vertical-ngo.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/vertical-ngo/tree/10.0/framework_agreement_sourcing
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYNGO
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Stéphane Bidoul (ACSONE)
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:20:04
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/purchase-workflow:
    - framework_agreement
    - purchase_requisition_bid_selection
    - purchase_rfq_bid_workflow
    - purchase_requisition_multicurrency
    - purchase_requisition_delivery_address
    - purchase_requisition_auto_rfq
    - purchase_requisition_transport_document
    - purchase_transport_document
    - purchase_origin_address
    - purchase_delivery_address
OCA/sale-workflow:
    - sale_sourced_by_line
    - sale_procurement_group_by_line
    - sale_owner_stock_sourcing
    - sale_validity
    - sale_quotation_sourcing
    - sale_exception
OCA/server-tools:
    - base_exception
OCA/stock-logistics-transport:
    - sale_transport_multi_address
    - stock_transport_multi_address
    - purchase_requisition_transport_multi_address
    - purchase_transport_multi_address
    - transport_information
OCA/stock-logistics-workflow:
    - stock_ownership_availability_rules
OCA/vertical-ngo:
    - logistic_requisition
    - logistic_order
    - logistic_consignee
    - ngo_purchase
    - framework_agreement_requisition
    - ngo_purchase_requisition
odoo/odoo:
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - report
    - procurement
    - barcodes
    - web_planner
    - purchase
    - stock_account
    - account
    - analytic
    - sale_stock
    - sale
    - sales_team
    - stock_dropshipping
    - purchase_requisition
    - delivery
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_create_agr_po_from_source Create Purchase Order From Requisition Source logistic.requisition.source.create.agr.po form New
view_logistic_requisition_line_form logistic.requisition.line.form logistic.requisition.line button Inherits logistic_requisition.view_logistic_requisition_line_form
view_logistic_requisition_source_form view_logistic_requisition_source_form logistic.requisition.source field Inherits logistic_requisition.view_logistic_requisition_source_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • cost_estimate(self, cr, uid, ids, context=None)
    Override to link PO to cost_estimate$ In a normal flow, when you chose a bid as the winning one, the bid is dupplicated to generate the draft PO. On this action, it link the LRS to the generated PO line. In a tender flow, we don't dupplicate the bid, it's only a PO. The link between the LRS and the PO line should then be created here. This is for the drop shipping to work propely cause in that case, SO and PO are linked together.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • make_purchase_order(self, cr, uid, ids, pricelist, context=None)
    Create a purchase order from the LRS ids list. This method will create one PO with all lines. Between them, you'll have line of type LTA (framewrok agreement) and line of type other. Currently, only one line of type LTA is accepted at a time. We'll raise an error if other types are selected here. We accept line of type other here to include products not included in the LTA for example : you order Product A under LTA + the transport as a LRS of type other. :param integer list ids: ids of logistic.requisition.source :param browse_record pricelist: product.pricelist :returns integer : generated PO id
  • update_agreement(self)
    @api.onchange('sourcing_method', 'portfolio_id', 'proposed_qty', 'proposed_product_id')
    Update the choice of agreement depending on other fields. Like in the purchase order with framework_agreement 2.0, we do not choose automatically the cheapest agreement, except when there is only one that is suitable. If the current choice is suitable, keep it.

New fields (0)

No new fields.

Public methods (2)
  • action_create_agreement_po_requisition(self, cr, uid, ids, context=None)
    Implement buttons that create PO from selected source lines
  • default_get(self, cr, uid, fields_list, context=None)
    Take the pricelist of the lrs by default. Show the available choice for the user.

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self, cr, uid, ids, context=None)

New fields (0)

No new fields.

Public methods (1)
  • action_accepted(self)
    @api.multi
    On acceptation of Cost Estimate, we generate PO for all line sourced by a framework agreement Framework agreement currency is selected this way: - Currency matching with Cost Estimate currency. - Or first currency found on framework agreement.

New fields (0)

No new fields.

Public methods (1)
  • button_confirm(self, cr, uid, ids, context=None)
    Override confirmation of request of quotation to support LTA Related PO generated by agreement source line will be passed to state draft_po.
REPOSITORY
REPOSITORYOCA/vertical-ngo
GIT
GIThttps://github.com/OCA/vertical-ngo.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/vertical-ngo/tree/9.0/framework_agreement_sourcing
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYNGO
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Stéphane Bidoul (ACSONE)
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:25
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/purchase-workflow:
    - framework_agreement
    - purchase_requisition_bid_selection
    - purchase_rfq_bid_workflow
    - purchase_requisition_multicurrency
    - purchase_requisition_delivery_address
    - purchase_requisition_auto_rfq
    - purchase_requisition_transport_document
    - purchase_transport_document
    - purchase_origin_address
    - purchase_delivery_address
OCA/sale-workflow:
    - sale_sourced_by_line
    - sale_procurement_group_by_line
    - sale_owner_stock_sourcing
    - sale_validity
    - sale_quotation_sourcing
    - sale_exception
OCA/server-tools:
    - web_context_tunnel
OCA/stock-logistics-transport:
    - sale_transport_multi_address
    - stock_transport_multi_address
    - purchase_requisition_transport_multi_address
    - purchase_transport_multi_address
    - transport_information
OCA/stock-logistics-workflow:
    - stock_ownership_availability_rules
OCA/vertical-ngo:
    - logistic_requisition
    - logistic_order
    - logistic_consignee
    - ngo_purchase
    - framework_agreement_requisition
    - ngo_purchase_requisition
odoo/odoo:
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - report
    - procurement
    - barcodes
    - web_planner
    - purchase
    - stock_account
    - account
    - analytic
    - web_tip
    - sale_stock
    - sale
    - sales_team
    - stock_dropshipping
    - purchase_requisition
    - delivery
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_create_agr_po_from_source Create Purchase Order From Requisition Source logistic.requisition.source.create.agr.po form New
view_logistic_requisition_line_form logistic.requisition.line.form logistic.requisition.line button Inherits logistic_requisition.view_logistic_requisition_line_form
view_logistic_requisition_source_form view_logistic_requisition_source_form logistic.requisition.source field Inherits logistic_requisition.view_logistic_requisition_source_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • cost_estimate(self, cr, uid, ids, context=None)
    Override to link PO to cost_estimate$ In a normal flow, when you chose a bid as the winning one, the bid is dupplicated to generate the draft PO. On this action, it link the LRS to the generated PO line. In a tender flow, we don't dupplicate the bid, it's only a PO. The link between the LRS and the PO line should then be created here. This is for the drop shipping to work propely cause in that case, SO and PO are linked together.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • make_purchase_order(self, cr, uid, ids, pricelist, context=None)
    Create a purchase order from the LRS ids list. This method will create one PO with all lines. Between them, you'll have line of type LTA (framewrok agreement) and line of type other. Currently, only one line of type LTA is accepted at a time. We'll raise an error if other types are selected here. We accept line of type other here to include products not included in the LTA for example : you order Product A under LTA + the transport as a LRS of type other. :param integer list ids: ids of logistic.requisition.source :param browse_record pricelist: product.pricelist :returns integer : generated PO id
  • update_agreement(self)
    @api.onchange('sourcing_method', 'portfolio_id', 'proposed_qty', 'proposed_product_id')
    Update the choice of agreement depending on other fields. Like in the purchase order with framework_agreement 2.0, we do not choose automatically the cheapest agreement, except when there is only one that is suitable. If the current choice is suitable, keep it.

New fields (0)

No new fields.

Public methods (2)
  • action_create_agreement_po_requisition(self, cr, uid, ids, context=None)
    Implement buttons that create PO from selected source lines
  • default_get(self, cr, uid, fields_list, context=None)
    Take the pricelist of the lrs by default. Show the available choice for the user.

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self, cr, uid, ids, context=None)

New fields (0)

No new fields.

Public methods (1)
  • action_accepted(self)
    @api.multi
    On acceptation of Cost Estimate, we generate PO for all line sourced by a framework agreement Framework agreement currency is selected this way: - Currency matching with Cost Estimate currency. - Or first currency found on framework agreement.

New fields (0)

No new fields.

Public methods (1)
  • button_confirm(self, cr, uid, ids, context=None)
    Override confirmation of request of quotation to support LTA Related PO generated by agreement source line will be passed to state draft_po.
REPOSITORY
REPOSITORYOCA/vertical-ngo
GIT
GIThttps://github.com/OCA/vertical-ngo.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/vertical-ngo/tree/8.0/framework_agreement_sourcing
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYNGO
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Yannick Vaucher, Alexandre Fayolle, Joël Grand-Guillaume, Leonardo Pistone, Stéphane Bidoul (ACSONE), Nicolas Bessi (nbessi), OCA-git-bot
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:28
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/purchase-workflow:
    - framework_agreement
    - purchase_requisition_bid_selection
    - purchase_rfq_bid_workflow
    - purchase_requisition_multicurrency
    - purchase_requisition_delivery_address
    - purchase_requisition_auto_rfq
    - purchase_requisition_transport_document
    - purchase_transport_document
    - purchase_origin_address
    - purchase_delivery_address
OCA/sale-workflow:
    - sale_sourced_by_line
    - sale_procurement_group_by_line
    - sale_owner_stock_sourcing
    - sale_validity
    - sale_quotation_sourcing
    - sale_exceptions
OCA/server-tools:
    - web_context_tunnel
OCA/stock-logistics-transport:
    - sale_transport_multi_address
    - stock_transport_multi_address
    - purchase_requisition_transport_multi_address
    - purchase_transport_multi_address
    - transport_information
OCA/stock-logistics-workflow:
    - stock_ownership_availability_rules
OCA/vertical-ngo:
    - logistic_requisition
    - logistic_order
    - logistic_consignee
    - ngo_purchase
    - framework_agreement_requisition
    - ngo_purchase_requisition
odoo/odoo:
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - web
    - report
    - procurement
    - board
    - web_kanban_gauge
    - web_kanban_sparkline
    - purchase
    - stock_account
    - account
    - analytic
    - edi
    - email_template
    - sale_stock
    - sale
    - sales_team
    - account_voucher
    - stock_dropshipping
    - purchase_requisition
    - delivery
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_create_agr_po_from_source Create Purchase Order From Requisition Source logistic.requisition.source.create.agr.po form New
view_logistic_requisition_line_form logistic.requisition.line.form logistic.requisition.line button Inherits logistic_requisition.view_logistic_requisition_line_form
view_logistic_requisition_source_form view_logistic_requisition_source_form logistic.requisition.source field Inherits logistic_requisition.view_logistic_requisition_source_form
Models touched (7)

New fields (0)

No new fields.

Public methods (1)
  • cost_estimate(self, cr, uid, ids, context=None)
    Override to link PO to cost_estimate$ In a normal flow, when you chose a bid as the winning one, the bid is dupplicated to generate the draft PO. On this action, it link the LRS to the generated PO line. In a tender flow, we don't dupplicate the bid, it's only a PO. The link between the LRS and the PO line should then be created here. This is for the drop shipping to work propely cause in that case, SO and PO are linked together.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • make_purchase_order(self, cr, uid, ids, pricelist, context=None)
    Create a purchase order from the LRS ids list. This method will create one PO with all lines. Between them, you'll have line of type LTA (framewrok agreement) and line of type other. Currently, only one line of type LTA is accepted at a time. We'll raise an error if other types are selected here. We accept line of type other here to include products not included in the LTA for example : you order Product A under LTA + the transport as a LRS of type other. :param integer list ids: ids of logistic.requisition.source :param browse_record pricelist: product.pricelist :returns integer : generated PO id
  • update_agreement(self)
    @api.onchange('sourcing_method', 'portfolio_id', 'proposed_qty', 'proposed_product_id')
    Update the choice of agreement depending on other fields. Like in the purchase order with framework_agreement 2.0, we do not choose automatically the cheapest agreement, except when there is only one that is suitable. If the current choice is suitable, keep it.

New fields (0)

No new fields.

Public methods (2)
  • action_create_agreement_po_requisition(self, cr, uid, ids, context=None)
    Implement buttons that create PO from selected source lines
  • default_get(self, cr, uid, fields_list, context=None)
    Take the pricelist of the lrs by default. Show the available choice for the user.

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self, cr, uid, ids, context=None)

New fields (0)

No new fields.

Public methods (1)
  • action_accepted(self)
    @api.multi
    On acceptation of Cost Estimate, we generate PO for all line sourced by a framework agreement Framework agreement currency is selected this way: - Currency matching with Cost Estimate currency. - Or first currency found on framework agreement.

New fields (0)

No new fields.

Public methods (1)
  • button_confirm(self, cr, uid, ids, context=None)
    Override confirmation of request of quotation to support LTA Related PO generated by agreement source line will be passed to state draft_po.
REPOSITORY
REPOSITORYOCA/vertical-ngo
GIT
GIThttps://github.com/OCA/vertical-ngo.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/vertical-ngo/tree/7.0/framework_agreement_sourcing
VERSION
VERSION 0.1
CATEGORY
CATEGORYNGO
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSYannick Vaucher, Romain Deheele, Alexandre Fayolle, Matthieu Dietrich, Joel Grand-Guillaume, Leonardo Pistone, Nicolas Bessi
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/purchase-workflow:
    - framework_agreement
    - purchase_group_hooks
OCA/sale-reporting:
    - sale_order_webkit
OCA/sale-workflow:
    - sale_validity
    - sale_sourced_by_line
    - sale_dropshipping
OCA/stock-logistics-warehouse:
    - stock_location_ownership
OCA/vertical-ngo:
    - logistic_requisition
    - transport_plan
    - logistic_order
OCA/webkit-tools:
    - base_headers_webkit
odoo/odoo:
    - stock
    - product
    - base
    - process
    - web
    - decimal_precision
    - mail
    - base_setup
    - web_kanban
    - account
    - analytic
    - board
    - edi
    - email_template
    - procurement
    - purchase
    - sale
    - account_voucher
    - sale_stock
    - delivery
    - report_webkit
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Automatically source logistic order from framework agreement
============================================================

If you have a framework agreement negociated for the current product in
your logistic requisition. If the date and state of agreement are OK,
agreement will be used as source for the concerned source lines
of your request.

In this case tender flow is byassed and confirmed PO will be generated
when logistic requisition is confirmed.

When confirming Logistic request sourcing lines are generating.
Generation process will look up all agreements with remaining quantity
and use them one after the other.

We will first choose cheapest agreements with price in negociated currency even
if they are cheaper in other currences.

Then we will choose remaining agreements ordered
by price converted in company currency.

You can prevent this behavior by forcing only one agreement per product at
the same time in company.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
add_supplier_and_agreement_on_source_line add supplier and agrement on source line logistic.requisition.source field Inherits logistic_requisition.view_logistic_requisition_source_form
addd_agreement_source_line_onchange ad agreement source line onchange logistic.requisition.source data Inherits logistic_requisition.view_logistic_requisition_source_form
view_create_agr_po_from_source Create Purchase Order From Requisition Source logistic.requisition.source.create.agr.po form New
Models touched (6)

New fields (0)

No new fields.

Public methods (1)
  • cost_estimate(self, cr, uid, ids, context=None)
    Override to link PO to cost_estimate$ In a normal flow, when you chose a bid as the winning one, the bid is dupplicated to generate the draft PO. On this action, it link the LRS to the generated PO line. In a tender flow, we don't dupplicate the bid, it's only a PO. The link between the LRS and the PO line should then be created here. This is for the drop shipping to work propely cause in that case, SO and PO are linked together.

New fields (0)

No new fields.

Public methods (1)
  • make_source_line(self, cr, uid, line, force_qty=None, agreement=None, context=None)
    Generate a source line from a requisition line, see _prepare_line_source for details. :param line: browse record of origin logistic.request :param force_qty: if set this quantity will be used instead of requested quantity :returns: id of generated source line

New fields (0)

No new fields.

Public methods (5)
  • make_purchase_order(self, cr, uid, ids, pricelist, context=None)
    Create a purchase order from the LRS ids list. This method will create one PO with all lines. Between them, you'll have line of type LTA (framewrok agreement) and line of type other. Currently, only one line of type LTA is accepted at a time. We'll raise an error if other types are selected here. We accept line of type other here to include products not included in the LTA for example : you order Product A under LTA + the transport as a LRS of type other. :param integer list ids: ids of logistic.requisition.source :param browse_record pricelist: product.pricelist :returns integer : generated PO id
  • onchange_agreement(self, cr, uid, ids, agreement_id, req_line_id, qty, proposed_product_id, context=None)
    @id_boilerplate
  • onchange_product_id(self, cr, uid, ids, method, req_line_id, proposed_product_id, proposed_qty, context=None)
    @id_boilerplate
    Call when product is set on a source line. If sourcing method is framework agreement it will set price, agreement and supplier if possible and raise quantity warning.
  • onchange_quantity(self, cr, uid, ids, method, req_line_id, qty, proposed_product_id, context=None)
    @id_boilerplate
    Raise a warning if agreed qty is not sufficient
  • onchange_sourcing_method(self, cr, uid, ids, method, req_line_id, proposed_product_id, proposed_qty=0, context=None)
    @id_boilerplate
    Called when source method is set on a source line. If sourcing method is framework agreement it will set price, agreement and supplier if possible and raise quantity warning.

New fields (0)

No new fields.

Public methods (2)
  • action_create_agreement_po_requisition(self, cr, uid, ids, context=None)
    Implement buttons that create PO from selected source lines
  • default_get(self, cr, uid, fields_list, context=None)
    Take the pricelist of the lrs by default. Show the available choice for the user.

New fields (0)

No new fields.

Public methods (1)
  • action_confirm(self, cr, uid, ids, context=None)

New fields (0)

No new fields.

Public methods (1)
  • button_confirm(self, cr, uid, ids, context=None)
    Override confirmation of request of cotation to support LTA Related PO generated by agreement source line will be passed to state confirm.