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', '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', 'summary': 'Manage Website Coupon Codes for Products/Categories/All Products & Its Redeem Operations',
'category': 'Website', 'category': 'Website',
'author': 'Cybrosys Techno Solutions', 'author': 'Cybrosys Techno Solutions',

26
website_coupon/i18n/fr.po

@ -2,13 +2,13 @@
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * website_coupon # * website_coupon
# #
# Xavier Brochard <xavier@alternatif.org>, 2017. # Xavier Brochard <xavier@alternatif.org>, 2017, 2018.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0-20171109\n" "Project-Id-Version: Odoo Server 10.0-20171109\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-17 11:24+0000\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" "Last-Translator: Xavier Brochard <xavier@alternatif.org>\n"
"Language-Team: French <>\n" "Language-Team: French <>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -21,7 +21,7 @@ msgstr ""
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.cart_lines_extended #: model:ir.ui.view,arch_db:website_coupon.cart_lines_extended
msgid "<small><i class=\"fa fa-trash-o\"/> Remove</small>" 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 #. module: website_coupon
#: selection:gift.voucher,voucher_type:0 #: selection:gift.voucher,voucher_type:0
@ -36,7 +36,7 @@ msgstr "Valable sur"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.applied_coupons_view #: model:ir.ui.view,arch_db:website_coupon.applied_coupons_view
msgid "Applied Coupons" msgid "Applied Coupons"
msgstr "" msgstr "Codes promo utilisés"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.voucher_code #: model:ir.ui.view,arch_db:website_coupon.voucher_code
@ -61,7 +61,7 @@ msgstr "Restrictions obligatoires"
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_partner_coupon_coupon #: model:ir.model.fields,field_description:website_coupon.field_partner_coupon_coupon
msgid "Coupon Applied" msgid "Coupon Applied"
msgstr "Code utilisé" msgstr "Code promo utilisé"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.menu,name:website_coupon.gift_coupon_history #: 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_partner_applied_coupon
#: model:ir.model.fields,field_description:website_coupon.field_res_users_applied_coupon #: model:ir.model.fields,field_description:website_coupon.field_res_users_applied_coupon
msgid "Coupons Applied" msgid "Coupons Applied"
msgstr "" msgstr "Codes promo utilisés"
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_create_uid #: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_create_uid
@ -125,7 +125,7 @@ msgstr "Code promotionel"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.menu,name:website_coupon.gift_coupon_main #: model:ir.ui.menu,name:website_coupon.gift_coupon_main
msgid "Gift Coupons" msgid "Gift Coupons"
msgstr "Codes promo" msgstr "Promotions"
#. module: website_coupon #. module: website_coupon
#: model:ir.actions.act_window,name:website_coupon.action_gift_coupon_history #: model:ir.actions.act_window,name:website_coupon.action_gift_coupon_history
@ -135,7 +135,7 @@ msgstr "Promotions utilisées"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.menu,name:website_coupon.gift_voucher #: model:ir.ui.menu,name:website_coupon.gift_voucher
msgid "Gift Voucher" msgid "Gift Voucher"
msgstr "Promotions autorisées" msgstr "Promotion autorisée"
#. module: website_coupon #. module: website_coupon
#: model:ir.actions.act_window,name:website_coupon.action_gift_voucher #: model:ir.actions.act_window,name:website_coupon.action_gift_voucher
@ -178,7 +178,7 @@ msgstr ""
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_partner_id #: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_partner_id
msgid "Limit to a Single Partner" msgid "Limit to a Single Partner"
msgstr "Limiter au contact" msgstr "Limité au contact"
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_voucher_max_value #: 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 #: code:addons/website_coupon/models/gift_voucher.py:77
#, python-format #, python-format
msgid "Please check the voucher value" msgid "Please check the voucher value"
msgstr "" msgstr "Vérifiez la valeur de calcul autorisée"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.cart_lines_extended #: model:ir.ui.view,arch_db:website_coupon.cart_lines_extended
@ -255,7 +255,7 @@ msgstr "Débute le"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.voucher_code #: model:ir.ui.view,arch_db:website_coupon.voucher_code
msgid "The discount amount is too large" msgid "The discount amount is too large"
msgstr "" msgstr "La réduction est trop grande"
#. module: website_coupon #. module: website_coupon
#: model:ir.ui.view,arch_db:website_coupon.voucher_code #: model:ir.ui.view,arch_db:website_coupon.voucher_code
@ -265,12 +265,12 @@ msgstr "Ce code n'est pas valable"
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_total_avail #: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_total_avail
msgid "Total Available" msgid "Total Available"
msgstr "Quantité totale disponible" msgstr "Quantité disponible"
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_limit #: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_limit
msgid "Total Available For Each User" msgid "Total Available For Each User"
msgstr "Quantité maxi par personne" msgstr "Quantité max par personne"
#. module: website_coupon #. module: website_coupon
#: model:ir.model.fields,field_description:website_coupon.field_gift_coupon_type #: 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" ?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <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"> <xpath expr="//div[@id='right_column']" position="inside">
<h4>Voucher Code</h4> <h4>Voucher Code</h4>
<p> <p>
@ -17,10 +19,15 @@
<p class="bg-warning">The discount amount is too large</p> <p class="bg-warning">The discount amount is too large</p>
</t> </t>
</t> </t>
<form t-if="website_sale_order and website_sale_order.website_order_line" action="/shop/gift_coupon" method="post" class="mb32"> <form t-if="website_sale_order and website_sale_order.website_order_line"
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()" /> action="/shop/gift_coupon" method="post"
class="mb32">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()" />
<div class="input-group"> <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"> <div class="input-group-btn">
<a class="btn btn-default a-submit">Apply</a> <a class="btn btn-default a-submit">Apply</a>
</div> </div>
@ -30,69 +37,50 @@
</template> </template>
<template id="cart_lines_extended" inherit_id="website_sale.cart_lines"> <template id="cart_lines_extended" inherit_id="website_sale.cart_lines">
<xpath expr="//table[@id='cart_products']" position="replace"> <xpath expr="//table[@id='cart_products']/thead/tr/th[1]" position="attributes">
<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"> <attribute name="width">100</attribute>
<thead> </xpath>
<tr> <xpath expr="//table[@id='cart_products']/thead/tr/th[3]" position="attributes">
<th width="100">Product</th> <attribute name="width">130</attribute>
<th></th> </xpath>
<th width="130" class="text-center">Quantity</th> <xpath expr="//table[@id='cart_products']/thead/tr/th[4]" position="attributes">
<th width="100" class="text-center">Price</th> <attribute name="width">100</attribute>
</tr> </xpath>
</thead>
<tbody> <xpath expr="//table[@id='cart_products']/tbody//td[@id='td-qty']/div"
<t t-foreach="website_sale_order.website_order_line" t-as="line"> position="replace">
<tr> <div class="input-group oe_website_spinner">
<td colspan="2" t-if="not line.product_id.product_tmpl_id"></td> <t t-if="line.product_id.display_name == 'Gift Coupon'">
<td align="center" t-if="line.product_id.product_tmpl_id"> <a href='#' class='js_delete_product no-decoration'>
<span t-field="line.product_id.image_small" t-options="{'widget': 'image', 'class': 'img-rounded'}" /> <small>
</td> <i class='fa fa-trash-o'></i>
<td t-if="line.product_id.product_tmpl_id"> Remove
<div> </small>
<a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }"> </a>
<strong t-esc="line.product_id.with_context(display_default_code=False).display_name" /> <input type="hidden" class="js_quantity form-control"
</a> t-att-data-line-id="line.id"
</div> t-att-data-product-id="line.product_id.id"
<div class="text-muted"> t-att-value="int(line.product_uom_qty)"
<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>
</t> </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> </xpath>
</template> </template>
</odoo> </odoo>

Loading…
Cancel
Save