[FIX] purchase_requisition: Create purchase order
Steps to reproduce (V 17.0):
- Create a new blanket order with agreement type "Call for bids":
- Select only one RFQ
- Use line of agreement
- use quantities of agreement
- Add a product and confirm
- Create a New quotation
- Traceback!
Bug:
typo in the onchange makes it so instead of setting payment_term_id to
false it's a False, which is actually a tupple (False,) meaning payment terms
will be a record set containg one value with Id False instead of an empty
record set (it's wrong but it doesn't really make a difference in this case)
until commit[1] in web_read clean up is used to get the Id from origin Id
for inherited fields ´not vals['id']´ is expected to be true if the value
has an origin Id but in this case it is true because Id is false
(co_records wasn't expected to contains values with Id False if Id is False
it should be empty)
commit[1]:https://github.com/odoo/odoo/pull/128878
closes odoo/odoo#144111
X-original-commit: 7c5106a46bc269f2ed4cbeb18f2172b274dd27a5
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This commit is contained in:
@@ -59,7 +59,7 @@ class PurchaseOrder(models.Model):
|
||||
|
||||
self.partner_id = partner.id
|
||||
self.fiscal_position_id = fpos.id
|
||||
self.payment_term_id = payment_term.id,
|
||||
self.payment_term_id = payment_term.id
|
||||
self.company_id = requisition.company_id.id
|
||||
self.currency_id = requisition.currency_id.id
|
||||
if not self.origin or requisition.name not in self.origin.split(', '):
|
||||
|
||||
Reference in New Issue
Block a user