Browse Source

Merge 2e5bdc035d into a2c636ad62

pull/97/merge
Xavier Brochard 7 years ago
committed by GitHub
parent
commit
69ecd8710a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      website_coupon/__manifest__.py
  2. 26
      website_coupon/i18n/fr.po
  3. 120
      website_coupon/views/templates.xml

2
website_coupon/__manifest__.py

@ -23,7 +23,7 @@
##############################################################################
{
'name': 'Website Coupon Code',
'version': '10.0.2.0.0',
'version': '10.0.2.1.0',
'summary': 'Manage Website Coupon Codes for Products/Categories/All Products & Its Redeem Operations',
'category': 'Website',
'author': 'Cybrosys Techno Solutions',

26
website_coupon/i18n/fr.po

@ -2,13 +2,13 @@
# This file contains the translation of the following modules:
# * website_coupon
#
# Xavier Brochard <xavier@alternatif.org>, 2017.
# Xavier Brochard <xavier@alternatif.org>, 2017, 2018.
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0-20171109\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-17 11:24+0000\n"
"PO-Revision-Date: 2017-11-17 15:04+0100\n"
"PO-Revision-Date: 2018-09-26 19:37+0100\n"
"Last-Translator: Xavier Brochard <xavier@alternatif.org>\n"
"Language-Team: French <>\n"
"MIME-Version: 1.0\n"
@ -21,7 +21,7 @@ msgstr ""
#. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.cart_lines_extended
msgid "<small><i class=\"fa fa-trash-o\"/> Remove</small>"
msgstr "<small><i class=\"fa fa-trash-o\"/> Enlever</small>"
msgstr "<small><i class=\"fa fa-trash-o\"/> Supprimer</small>"
#. module: website_coupon
#: selection:gift.voucher,voucher_type:0
@ -36,7 +36,7 @@ msgstr "Valable sur"
#. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.applied_coupons_view
msgid "Applied Coupons"
msgstr ""
msgstr "Codes promo utilisés"
#. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.voucher_code
@ -61,7 +61,7 @@ msgstr "Restrictions obligatoires"
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_partner_coupon_coupon
msgid "Coupon Applied"
msgstr "Code utilisé"
msgstr "Code promo utilisé"
#. module: website_coupon
#: model:ir.ui.menu,name:website_coupon.gift_coupon_history
@ -72,7 +72,7 @@ msgstr "Utilisation"
#: model:ir.model.fields,field_description:website_coupon.field_res_partner_applied_coupon
#: model:ir.model.fields,field_description:website_coupon.field_res_users_applied_coupon
msgid "Coupons Applied"
msgstr ""
msgstr "Codes promo utilisés"
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_create_uid
@ -125,7 +125,7 @@ msgstr "Code promotionel"
#. module: website_coupon
#: model:ir.ui.menu,name:website_coupon.gift_coupon_main
msgid "Gift Coupons"
msgstr "Codes promo"
msgstr "Promotions"
#. module: website_coupon
#: model:ir.actions.act_window,name:website_coupon.action_gift_coupon_history
@ -135,7 +135,7 @@ msgstr "Promotions utilisées"
#. module: website_coupon
#: model:ir.ui.menu,name:website_coupon.gift_voucher
msgid "Gift Voucher"
msgstr "Promotions autorisées"
msgstr "Promotion autorisée"
#. module: website_coupon
#: model:ir.actions.act_window,name:website_coupon.action_gift_voucher
@ -178,7 +178,7 @@ msgstr ""
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_partner_id
msgid "Limit to a Single Partner"
msgstr "Limiter au contact"
msgstr "Limité au contact"
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_voucher_max_value
@ -217,7 +217,7 @@ msgstr "Pourcentage"
#: code:addons/website_coupon/models/gift_voucher.py:77
#, python-format
msgid "Please check the voucher value"
msgstr ""
msgstr "Vérifiez la valeur de calcul autorisée"
#. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.cart_lines_extended
@ -255,7 +255,7 @@ msgstr "Débute le"
#. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.voucher_code
msgid "The discount amount is too large"
msgstr ""
msgstr "La réduction est trop grande"
#. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.voucher_code
@ -265,12 +265,12 @@ msgstr "Ce code n'est pas valable"
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_total_avail
msgid "Total Available"
msgstr "Quantité totale disponible"
msgstr "Quantité disponible"
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_limit
msgid "Total Available For Each User"
msgstr "Quantité maxi par personne"
msgstr "Quantité max par personne"
#. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_type

120
website_coupon/views/templates.xml

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="voucher_code" inherit_id="website_sale.cart" active="False" customize_show="True" name="Voucher Code">
<template id="voucher_code" inherit_id="website_sale.cart"
active="False" customize_show="True"
name="Voucher Code">
<xpath expr="//div[@id='right_column']" position="inside">
<h4>Voucher Code</h4>
<p>
@ -17,10 +19,15 @@
<p class="bg-warning">The discount amount is too large</p>
</t>
</t>
<form t-if="website_sale_order and website_sale_order.website_order_line" action="/shop/gift_coupon" method="post" class="mb32">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" />
<form t-if="website_sale_order and website_sale_order.website_order_line"
action="/shop/gift_coupon" method="post"
class="mb32">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()" />
<div class="input-group">
<input name="promo_voucher" class="form-control" type="text" placeholder="code..." t-att-value="website_sale_order.pricelist_id.code or None" />
<input name="promo_voucher" class="form-control"
type="text" placeholder="code..."
t-att-value="website_sale_order.pricelist_id.code or None" />
<div class="input-group-btn">
<a class="btn btn-default a-submit">Apply</a>
</div>
@ -30,69 +37,50 @@
</template>
<template id="cart_lines_extended" inherit_id="website_sale.cart_lines">
<xpath expr="//table[@id='cart_products']" position="replace">
<table class="table table-striped table-condensed js_cart_lines" id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
<thead>
<tr>
<th width="100">Product</th>
<th></th>
<th width="130" class="text-center">Quantity</th>
<th width="100" class="text-center">Price</th>
</tr>
</thead>
<tbody>
<t t-foreach="website_sale_order.website_order_line" t-as="line">
<tr>
<td colspan="2" t-if="not line.product_id.product_tmpl_id"></td>
<td align="center" t-if="line.product_id.product_tmpl_id">
<span t-field="line.product_id.image_small" t-options="{'widget': 'image', 'class': 'img-rounded'}" />
</td>
<td t-if="line.product_id.product_tmpl_id">
<div>
<a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
<strong t-esc="line.product_id.with_context(display_default_code=False).display_name" />
</a>
</div>
<div class="text-muted">
<t t-foreach="line.name.splitlines()[1:]" t-as="name_line">
<span><t t-esc="name_line"/></span><br/>
</t>
</div>
<t t-if="line.product_id.display_name != 'Gift Coupon'">
<a href='#' class='js_delete_product no-decoration'> <small><i class='fa fa-trash-o'></i> Remove</small></a>
</t>
</td>
<td class="text-center" id="td-qty">
<t t-if="line.product_id.display_name == 'Gift Coupon'">
<a href='#' class='js_delete_product no-decoration'> <small><i class='fa fa-trash-o'></i> Remove</small></a>
<div class="input-group oe_website_spinner">
<input type="hidden" class="js_quantity form-control" t-att-data-line-id="line.id" t-att-data-product-id="line.product_id.id" t-att-value="int(line.product_uom_qty)" />
</div>
</t>
<t t-if="line.product_id.display_name != 'Gift Coupon'">
<div class="input-group oe_website_spinner">
<a t-attf-href="#" class="mb8 input-group-addon js_add_cart_json" data-no-instant="">
<i class="fa fa-minus"></i>
</a>
<input type="text" class="js_quantity form-control" t-att-data-line-id="line.id" t-att-data-product-id="line.product_id.id" t-att-value="int(line.product_uom_qty)" />
<a t-attf-href="#" class="mb8 input-group-addon float_left js_add_cart_json" data-no-instant="">
<i class="fa fa-plus"></i>
</a>
</div>
</t>
</td>
<td class="text-center" id="td-price" name="price">
<t t-if="(compute_currency(line.product_id.lst_price) - line.price_reduce ) &gt; 0.01 and website.get_current_pricelist().discount_policy=='without_discount'">
<del t-attf-class="#{'text-danger mr8'}" style="white-space: nowrap;" t-esc="compute_currency(line.product_id.website_public_price)" t-options="{'widget': 'monetary', 'display_currency': website.get_current_pricelist().currency_id, 'from_currency': website.currency_id}" />
</t>
<span t-field="line.price_reduce_taxexcl" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'from_currency': website_sale_order.pricelist_id.currency_id, 'display_currency': website.currency_id}" groups="sale.group_show_price_subtotal" />
<span t-field="line.price_reduce_taxinc" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'from_currency': website_sale_order.pricelist_id.currency_id, 'display_currency': website.currency_id}" groups="sale.group_show_price_total" />
</td>
</tr>
<xpath expr="//table[@id='cart_products']/thead/tr/th[1]" position="attributes">
<attribute name="width">100</attribute>
</xpath>
<xpath expr="//table[@id='cart_products']/thead/tr/th[3]" position="attributes">
<attribute name="width">130</attribute>
</xpath>
<xpath expr="//table[@id='cart_products']/thead/tr/th[4]" position="attributes">
<attribute name="width">100</attribute>
</xpath>
<xpath expr="//table[@id='cart_products']/tbody//td[@id='td-qty']/div"
position="replace">
<div class="input-group oe_website_spinner">
<t t-if="line.product_id.display_name == 'Gift Coupon'">
<a href='#' class='js_delete_product no-decoration'>
<small>
<i class='fa fa-trash-o'></i>
Remove
</small>
</a>
<input type="hidden" class="js_quantity form-control"
t-att-data-line-id="line.id"
t-att-data-product-id="line.product_id.id"
t-att-value="int(line.product_uom_qty)"
/>
</t>
</tbody>
</table>
<t t-if="line.product_id.display_name != 'Gift Coupon'">
<a t-attf-href="#"
class="mb8 input-group-addon js_add_cart_json"
data-no-instant="">
<i class="fa fa-minus"></i>
</a>
<input type="text" class="js_quantity form-control"
t-att-data-line-id="line.id"
t-att-data-product-id="line.product_id.id"
t-att-value="int(line.product_uom_qty)" />
<a t-attf-href="#"
class="mb8 input-group-addon float_left js_add_cart_json"
data-no-instant="">
<i class="fa fa-plus"></i>
</a>
</t>
</div>
</xpath>
</template>
</odoo>
</odoo>

Loading…
Cancel
Save