Below is Error Message i got on clicking Confirm Sale button
File "/home/Desktop/odoo-10.0/custom_addons/pharmacy/pharmacy.py", line 22, in action_confirm
res = super(SaleOrder, self).action_confirm()
TypeError: super(type, obj): obj must be an instance or subtype of type
My code below
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools.translate import _
class SaleOrder(models.Model):
_inherit = 'sale.order'
patient = fields.Many2one('one.clinic.patient', string='Patient')
doctor = fields.Many2one('one.clinic.doctor', string='Doctor')
class Picking(models.Model):
_inherit = 'stock.picking'
patient = fields.Many2one('one.clinic.patient', string='Patient', readonly=False)
doctor = fields.Many2one('one.clinic.doctor', string='Doctor', readonly=False)
@api.multi
def action_confirm(self):
res = super(SaleOrder, self).action_confirm()
for rec in self:
rec.picking_ids.write({'patient': rec.patient, 'doctor': rec.doctor})
return res