Hello All,
I selected customer name in sales order form. And above the sale order line i added a button, for this button wizard is opened and getting information from customer. I want that in wizard customer name(partner_id) should be auto field when user open it. So, ho can i do that?
Wizard file code is:
class RentalPackWizard(models.TransientModel):
_name = "rental.pack.wizard"
_description = "Rental Pack Wizard"
"""@api.model
def _get_default_partner(self):
partner = self.env['res.partner'].search([()], limit=1)
return partner"""
ser6_partner_id = fields.Many2one('res.partner', string='Customer')# , default=_get_default_partner)
Also Attached image for problem