Help

0

HTML field not saving and Product price on website not showing comma

I have created a html field on product.template but the field is not saving value. When I write some content in the field and click on SAVE it gets emptied and nothing is saved.

Code for the field is below:

class product_template(osv.Model):
    _inherit = 'product.template'
    _columns = { 'website_prod_description': fields.html('Description for Website'), }
XML:
<xpath expr="//field[@name='description_purchase']" position="after">
     <separator string="Description for Website" colspan="4"/>
     <field name="website_prod_description" nolabel="1" colspan="4"/>
</xpath>


Second issue is, product price on product page is not showing comma separate but showing on rest of the page.

Example: It should show 2,730.00 but showing 2730.00

But on shop or checkout page it shows 2,730.00 . The comma isn't showing only on product page.

The xml on template I am using is below:

<span class="oe_price" style="white-space: nowrap;" 
  t-att-data-product-id="product.id"
  t-field="product.price"
  t-field-options='{"widget": "monetary","display_currency": "website.currency_id"}'/>


Avatar
Discard