parameters: (self, product_id=None)
return_statement: return res
docstring: Returns dates based on number of days configured in current lot's product.
docstring_summary: Returns dates based on number of days configured in current lot's product.
docstring_tokens: Returns dates based on number of days configured in current lot s product .
function: def _get_dates(self, product_id=None):
          """Returns dates based on number of days configured in current lot's product."""
          mapped_fields = {
              'expiration_date': 'expiration_time',
              'use_date': 'use_time',
              'removal_date': 'removal_time',
              'alert_date': 'alert_time'
          }
          res = dict.fromkeys(mapped_fields, False)
          product = self.env['product.product'].browse(product_id) or self.product_id
          if product:
              for field in mapped_fields:
                  duration = getattr(product, mapped_fields[field])
                  if duration:
                      date = datetime.datetime.now() + datetime.timedelta(days=duration)
                      res[field] = fields.Datetime.to_string(date)
          return res
function_tokens: def _get_dates ( self , product_id = None ) : mapped_fields = { 'expiration_date' : 'expiration_time' , 'use_date' : 'use_time' , 'removal_date' : 'removal_time' , 'alert_date' : 'alert_time' } res = dict . fromkeys ( mapped_fields , False ) product = self . env [ 'product.product' ] . browse ( product_id ) or self . product_id if product : for field in mapped_fields : duration = getattr ( product , mapped_fields [ field ] ) if duration : date = datetime . datetime . now ( ) + datetime . timedelta ( days = duration ) res [ field ] = fields . Datetime . to_string ( date ) return res