'Store the initial standard price in order to be able to retrieve the cost of a product template for a given date'

@api.model
def create(self, vals):

    tools.image_resize_images(vals)
    template = super(ProductTemplate, self).create(vals)
    if ('create_product_product' not in self._context):
        template.with_context(create_from_tmpl=True).create_variant_ids()
    related_vals = {}
    if vals.get('barcode'):
        related_vals['barcode'] = vals['barcode']
    if vals.get('default_code'):
        related_vals['default_code'] = vals['default_code']
    if vals.get('standard_price'):
        related_vals['standard_price'] = vals['standard_price']
    if vals.get('volume'):
        related_vals['volume'] = vals['volume']
    if vals.get('weight'):
        related_vals['weight'] = vals['weight']
    if related_vals:
        template.write(related_vals)
    return template
