ソースを参照

quitar cero decimal

Deisy 8 年 前
コミット
3c1424f78e
2 ファイル変更7 行追加6 行削除
  1. 3 3
      views/snippets.xml
  2. 4 3
      views/theme.xml

+ 3 - 3
views/snippets.xml

@@ -204,9 +204,9 @@
                                                                   "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
                                                                 }'/> 
                                                             </t>
-                                                            <span t-field="product.price" style="white-space: nowrap;"  t-field-options='{
-                                                                   "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
-                                                               }'>
+                                                            <span t-field="product.price" style="white-space: nowrap;"  t-field-options='{  "widget": "monetary",
+                                                                   "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"}'
+                                                                   t-esc="str('{p:0,.0f}'.format(p=product.price).replace(',','.'))">
                                                             </span> &#8370;
                                                             <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
                                                             <span itemprop="price" style="display:none;" t-esc="product.price"/>

+ 4 - 3
views/theme.xml

@@ -1339,8 +1339,9 @@ Somos una tienda mayorista que trabajamos exclusivamente para vos, con las mejor
 										<span t-field="product.price" style="white-space: nowrap;"  t-field-options='{
 														                   "widget": "monetary",
 														                   "display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
-														               }'>
-										</span>
+														               }' t-esc="str('{p:0,.0f}'.format(p=product.price).replace(',','.'))"
+                                           >
+										</span> &amp;#8370
 										<span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
 										<span itemprop="price" style="display:none;" t-esc="product.price"/>
 									</b>
@@ -1395,7 +1396,7 @@ Somos una tienda mayorista que trabajamos exclusivamente para vos, con las mejor
 
 
                                                           </t>
-                                                          <span t-field="product.price" style="white-space: nowrap;" t-field-options="{                                        &quot;widget&quot;: &quot;monetary&quot;,                                        &quot;display_currency&quot;: &quot;user_id.partner_id.property_product_pricelist.currency_id&quot;                                    }"></span>
+                                                          <span t-field="product.price" style="white-space: nowrap;" t-field-options="{                                        &quot;widget&quot;: &quot;monetary&quot;,                                        &quot;display_currency&quot;: &quot;user_id.partner_id.property_product_pricelist.currency_id&quot;                                    }" t-esc="str('{p:0,.0f}'.format(p=product.price).replace(',','.'))"></span> &amp;#8370
                                                           <span itemprop="priceCurrency" style="display:none;" t-esc="user_id.partner_id.property_product_pricelist.currency_id.name"/>
                                                           <span itemprop="price" style="display:none;" t-esc="product.price"/>
                                                       </b>