This commit removes the call for tender feature via a purchase.requisition. This feature is to be replaced with the ability to directly compare prices/options of POs/RFQs within a PO to remove extra steps to compare them. The linkage between POs previously provided by a purchase.requistion is replaced by the POs being directly linked to each other. Feature to auto-create call to tenders via a product option is removed and the user is expected to know/be responsible for when they should do a call to tender themselves. All references to old Call to Tenders replaced with Blanket Order, and we remove/rename the menu items since Blanket Order is now the only purchase.requisition.type option (we expect minimal customizated types). Follow-on refactoring to switch purchase.requisition to purchase.blanket.order to come later. Follow-on refactoring to switch purchase.requisition to purchase.blanket.order to come later. Part of Task: 2695116 Upgrade PR: odoo/upgrade#3586 Part-of: odoo/odoo#87656
23 lines
860 B
Python
23 lines
860 B
Python
# -*- encoding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class SupplierInfo(models.Model):
|
|
_inherit = 'product.supplierinfo'
|
|
|
|
purchase_requisition_id = fields.Many2one('purchase.requisition', related='purchase_requisition_line_id.requisition_id', string='Agreement')
|
|
purchase_requisition_line_id = fields.Many2one('purchase.requisition.line')
|
|
|
|
|
|
class ProductProduct(models.Model):
|
|
_inherit = 'product.product'
|
|
|
|
def _prepare_sellers(self, params=False):
|
|
sellers = super(ProductProduct, self)._prepare_sellers(params=params)
|
|
if params and params.get('order_id'):
|
|
return sellers.filtered(lambda s: not s.purchase_requisition_id or s.purchase_requisition_id == params['order_id'].requisition_id)
|
|
else:
|
|
return sellers
|