Hello All,
I created a master table for estimated weight. For this master table i have two float fields 'min' and 'max'. Now i have 10 records and in every record there is 'min' and 'max' value. Now i want to show all 'min' and 'max' values from table to another place. For this i use search method, but not reached upto the mark. So, How can i do that?
Python Code:
Master Table code --
class est_weight(models.Model):
_name = "est.weight"
_rec_name = 'est_weight_pet'
min = fields.Float("Min. Weight")
max = fields.Float("Max. Weight")
est_weight_price = fields.Integer(string="Price")
Here i want to search all min. and max. value:--
class RentalPackWizard(models.TransientModel):
_name = "rental.pack.wizard"
_description = "Rental Pack Wizard"
@api.model
def _get_min_max(self):
mini = self.env['est.weight'].search([('min', '=', '')], limit=1)
maxi = self.env['est.weight'].search([('max', '=', '')], limit=1)
Thanks in advance.