I can't load my module, becuase it is trying to search for an xpath location in apps settings, and my module is meant for the website_sales app. So, I have 2 questions
1) Is something wrong with my code
2) Is there a way to limit module's functionality only to specific url? (e.g. 127.0.0.1/shop)
Error log when I try to press "Upgrade", to update the edited module - https://pastebin.com/6mjgk38g
Template code:
<odoo>
<data>
<template id="website_sales_inh" name="webiste_sales_inherit" inherit_id="website_sale.products_item">
<xpath expr="//span[@data-oe-model='product.template' and @data-oe-id='2' and @data-oe-field='image_1920' and @data-oe-type='image' and @data-oe-expression='product.image_1920' and @class='d-flex h-100 justify-content-center align-items-center']" position="inside">
<input name="testing our site" t-att-value="1234" type="hidden"/>
</xpath>
</template>
</data>
</odoo>
Model code:
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class imgtogif_r(models.Model):
_inherit = 'product.product'
_name = 'product.product'