[ADD]change related to id and classed

This commit is contained in:
Mayank Vara 2018-01-16 14:34:24 +05:30
parent d6db32eec3
commit 644ccab917
8 changed files with 59 additions and 42 deletions

View File

@ -8,7 +8,7 @@
'category': 'Localization', 'category': 'Localization',
'description': """ 'description': """
This is the base module to manage the generic accounting chart in Odoo, Flectra. This is the base module to manage the generic accounting chart in Odoo, Flectra.
============================================================================== ================================================================================
Install some generic chart of accounts. Install some generic chart of accounts.
""", """,

View File

@ -62,7 +62,7 @@
<template id="portal_layout" name="Portal Layout"> <template id="portal_layout" name="Portal Layout">
<t t-call="portal.frontend_layout"> <t t-call="portal.frontend_layout">
<div class="container mt16 o_portal"> <div class="container mt16 o_portal mb16">
<div class="oe_structure"> <div class="oe_structure">
<div t-if="not no_breadcrumbs" class="row"> <div t-if="not no_breadcrumbs" class="row">
<div class="col-sm-12"> <div class="col-sm-12">

View File

@ -9,7 +9,7 @@
'depends': ['base', 'decimal_precision', 'mail'], 'depends': ['base', 'decimal_precision', 'mail'],
'description': """ 'description': """
This is the base module for managing products and pricelists in Odoo, Flectra. This is the base module for managing products and pricelists in Odoo, Flectra.
======================================================================== ==============================================================================
Products support variants, different pricing methods, vendors information, Products support variants, different pricing methods, vendors information,
make to stock/order, different units of measure, packaging and properties. make to stock/order, different units of measure, packaging and properties.

View File

@ -26,7 +26,7 @@
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<div class="col-md-8 col-md-offset-2 mb16 mt16"> <div class="col-md-8 col-md-offset-2 mb16 mt16">
<iframe width="100%" height="250" src="http://www.youtube.com/embed/EkbBFmIWoTE" frameborder="0" allowfullscreen></iframe> <iframe width="100%" height="250" src="https://www.youtube.com/embed/VDzX14PUEO8" frameborder="0" allowfullscreen></iframe>
<p> <p>
Emails are broken. Emails are broken.
</p><p> </p><p>

View File

@ -160,7 +160,7 @@
<!-- To display tags //no options --> <!-- To display tags //no options -->
<t t-foreach="blog_post.tag_ids" t-as="one_tag"> <t t-foreach="blog_post.tag_ids" t-as="one_tag">
<a class="mr8" t-attf-href="#{blog_url(tag=one_tag.id, date_begin=False, date_end=False)}" t-esc="one_tag.name"/> <a class="label label-primary" t-attf-href="#{blog_url(tag=one_tag.id, date_begin=False, date_end=False)}" t-esc="one_tag.name"/>
</t> </t>
<div class="o_sharing_links"> <div class="o_sharing_links">
<a class="fa fa-twitter-square o_twitter"></a> <a class="fa fa-twitter-square o_twitter"></a>
@ -403,7 +403,7 @@
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<t t-foreach="tags" t-as="nav_tag"> <t t-foreach="tags" t-as="nav_tag">
<li t-att-class="nav_tag.id in active_tag_ids and 'active' or None" style="display: inline-block;"> <li t-att-class="nav_tag.id in active_tag_ids and 'active' or None" style="display: inline-block;">
<a t-attf-href="#{blog_url(tag=tags_list(active_tag_ids, nav_tag.id))}"> <a t-attf-href="#{blog_url(tag=tags_list(active_tag_ids, nav_tag.id))}" class="chip">
<span t-field="nav_tag.name"/> <span t-field="nav_tag.name"/>
</a> </a>
</li> </li>

View File

@ -53,13 +53,13 @@ class Forum(models.Model):
'build your professional profile and become a better marketer together.')) 'build your professional profile and become a better marketer together.'))
welcome_message = fields.Html( welcome_message = fields.Html(
'Welcome Message', 'Welcome Message',
default = """<section class="bg-info" style="height: 168px;"><div class="container"> default = """<section class="bg-info"><div class="container">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12 mt16">
<h1 class="text-center" style="text-align: left;">Welcome!</h1> <h1 class="text-center" style="text-align: left;">Welcome!</h1>
<p class="text-muted text-center" style="text-align: left;">This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.</p> <p class="text-muted text-center" style="text-align: left;">This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.</p>
</div> </div>
<div class="col-md-12"> <div class="col-md-12 mt16 mb32">
<a href="#" class="js_close_intro">Hide Intro</a> <a class="btn btn-primary forum_register_url" href="/web/login">Register</a> </div> <a href="#" class="js_close_intro">Hide Intro</a> <a class="btn btn-primary forum_register_url" href="/web/login">Register</a> </div>
</div> </div>
</div> </div>

View File

@ -55,7 +55,7 @@
</div> </div>
<div class="container mt16 website_forum"> <div class="container mt16 website_forum">
<div class="navbar navbar-default"> <div class="navbar navbar-default" id="forum-menu">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#oe-help-navbar-collapse">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
@ -1383,11 +1383,11 @@
<span t-field="user.name"/> <span t-field="user.name"/>
<small>profile</small> <small>profile</small>
</h1> </h1>
<div class="row"> <div class="row mb32" id="user-details">
<div class="col-sm-2"> <div class="col-sm-2" id="user-avtar">
<img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/> <img class="img img-responsive img-circle" t-attf-src="/forum/user/#{user.id}/avatar"/>
</div> </div>
<div class="col-sm-10"> <div class="col-sm-10" id="user-table">
<table class="table table-condensed"> <table class="table table-condensed">
<tr> <tr>
<td rowspan="4" valign="top"><span class="text-muted">stats</span></td> <td rowspan="4" valign="top"><span class="text-muted">stats</span></td>
@ -1439,7 +1439,7 @@
</div> </div>
</div> </div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs" id="user-activity">
<li class="active"> <li class="active">
<a href="#questions" data-toggle="tab"><t t-esc="count_questions"/> Questions</a> <a href="#questions" data-toggle="tab"><t t-esc="count_questions"/> Questions</a>
</li> </li>

View File

@ -303,7 +303,7 @@
<template id="products_categories" inherit_id="website_sale.products" active="False" customize_show="True" name="eCommerce Categories"> <template id="products_categories" inherit_id="website_sale.products" active="False" customize_show="True" name="eCommerce Categories">
<xpath expr="//div[@id='products_grid_before']" position="inside"> <xpath expr="//div[@id='products_grid_before']" position="inside">
<ul class="nav nav-pills nav-stacked mt16"> <ul class="nav nav-pills nav-stacked mt32" id="filter-cm">
<li t-att-class=" '' if category else 'active' "> <li t-att-class=" '' if category else 'active' ">
<a t-att-href="keep('/shop',category=0)" class="o_not_editable">All Products</a> <a t-att-href="keep('/shop',category=0)" class="o_not_editable">All Products</a>
</li> </li>
@ -334,6 +334,11 @@
<template id="option_collapse_products_categories" name="Collapsible Category List" inherit_id="website_sale.products_categories" active="False" customize_show="True"> <template id="option_collapse_products_categories" name="Collapsible Category List" inherit_id="website_sale.products_categories" active="False" customize_show="True">
<xpath expr="//div[@id='products_grid_before']/ul" position="replace"> <xpath expr="//div[@id='products_grid_before']/ul" position="replace">
<h3 class="title_block widget-title">
<span>
Categories
</span>
</h3>
<ul class="nav nav-pills nav-stacked mt16" id="o_shop_collapse_category"> <ul class="nav nav-pills nav-stacked mt16" id="o_shop_collapse_category">
<li t-att-class=" '' if category else 'active' "> <li t-att-class=" '' if category else 'active' ">
<a t-att-href="keep('/shop',category=0)" class="o_not_editable">All Products</a> <a t-att-href="keep('/shop',category=0)" class="o_not_editable">All Products</a>
@ -349,11 +354,13 @@
<xpath expr="//div[@id='products_grid_before']" position="inside"> <xpath expr="//div[@id='products_grid_before']" position="inside">
<form class="js_attributes" method="get"> <form class="js_attributes" method="get">
<input type="hidden" name="search" t-att-value="search" /> <input type="hidden" name="search" t-att-value="search" />
<ul class="nav nav-pills nav-stacked mt16"> <ul class="nav nav-pills nav-stacked">
<t t-foreach="attributes" t-as="a"> <t t-foreach="attributes" t-as="a">
<li t-if="a.value_ids and len(a.value_ids) &gt; 1"> <li t-if="a.value_ids and len(a.value_ids) &gt; 1" class="mt32 attr-list">
<div> <div>
<strong t-field="a.name" /> <h4 class="title-block">
<span t-field="a.name"/>
</h4>
</div> </div>
<t t-if="a.type == 'select'"> <t t-if="a.type == 'select'">
<select class="form-control" name="attrib"> <select class="form-control" name="attrib">
@ -367,20 +374,26 @@
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<t t-foreach="a.value_ids" t-as="v"> <t t-foreach="a.value_ids" t-as="v">
<li t-att-class="'active' if v.id in attrib_set else None"> <li t-att-class="'active' if v.id in attrib_set else None">
<label style="margin: 0 20px;"> <div>
<input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else None" /> <input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)"
<span style="font-weight: normal" t-field="v.name" /> t-att-checked="'checked' if v.id in attrib_set else None"/>
</label> <label style="font-weight: normal" t-field="v.name"/>
</div>
</li> </li>
</t> </t>
</ul> </ul>
</t> </t>
<t t-if="a.type == 'color'"> <t t-if="a.type == 'color'">
<t t-foreach="a.value_ids" t-as="v"> <ul class="nav nav-pills nav-stacked">
<label t-attf-style="background-color:#{v.html_color or v.name}" t-attf-class="css_attribute_color #{'active' if v.id in attrib_set else ''}"> <t t-foreach="a.value_ids" t-as="v">
<input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)" t-att-checked="'checked' if v.id in attrib_set else None" t-att-title="v.name" /> <label t-attf-style="background-color:#{v.html_color or v.name}"
</label> t-attf-class="css_attribute_color #{'active' if v.id in attrib_set else ''}">
</t> <input type="checkbox" name="attrib" t-att-value="'%s-%s' % (a.id,v.id)"
t-att-checked="'checked' if v.id in attrib_set else None"
t-att-title="v.name"/>
</label>
</t>
</ul>
</t> </t>
</li> </li>
</t> </t>
@ -685,7 +698,7 @@
<t t-if="len(product.product_variant_ids) &gt; 1"> <t t-if="len(product.product_variant_ids) &gt; 1">
<label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id"> <label label-default="label-default" class="radio" t-foreach="product.product_variant_ids" t-as="variant_id">
<input type="radio" name="product_id" class="js_product_change" t-att-checked="'checked' if variant_id_index == 0 else None" t-att-value="variant_id.id" t-att-data-lst_price="variant_id.lst_price" t-att-data-price="variant_id.price"/> <input type="radio" name="product_id" class="js_product_change" t-att-checked="'checked' if variant_id_index == 0 else None" t-att-value="variant_id.id" t-att-data-lst_price="variant_id.lst_price" t-att-data-price="variant_id.price"/>
<span t-esc="variant_id.name_get()[0][1]"/> <label t-esc="variant_id.name_get()[0][1]"/>
<span class="badge" t-if="variant_id.price_extra"> <span class="badge" t-if="variant_id.price_extra">
<t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" style="white-space: nowrap;" t-options='{ <t t-esc="variant_id.price_extra > 0 and '+' or ''"/><span t-field="variant_id.price_extra" style="white-space: nowrap;" t-options='{
"widget": "monetary", "widget": "monetary",
@ -728,9 +741,9 @@
<t t-set="inc" t-value="0"/> <t t-set="inc" t-value="0"/>
<t t-foreach="variant_id.value_ids" t-as="value_id"> <t t-foreach="variant_id.value_ids" t-as="value_id">
<li class="form-group js_attribute_value" style="margin: 0;"> <li class="form-group js_attribute_value" style="margin: 0;">
<label class="control-label" style="margin: 0 20px;"> <label class="control-label">
<input type="radio" t-att-class="'js_variant_change' if variant_id.attribute_id.create_variant else None" t-att-checked="'checked' if not inc else None" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)" t-att-value="value_id.id" style="vertical-align: top; margin-right: 10px;"/> <input type="radio" t-att-class="'js_variant_change' if variant_id.attribute_id.create_variant else None" t-att-checked="'checked' if not inc else None" t-att-name="'attribute-%s-%s' % (product.id, variant_id.attribute_id.id)" t-att-value="value_id.id" style="vertical-align: top; margin-right: 10px;"/>
<span t-field="value_id.name"/> <label t-field="value_id.name"/>
<span class="badge" t-if="value_id.price_extra"> <span class="badge" t-if="value_id.price_extra">
<t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-options='{ <t t-esc="value_id.price_extra > 0 and '+' or ''"/><span t-field="value_id.price_extra" style="white-space: nowrap;" t-options='{
"widget": "monetary", "widget": "monetary",
@ -808,7 +821,7 @@
<t t-set="step" t-value="30"/> <t t-set="step" t-value="30"/>
</t> </t>
</div> </div>
<div class="row"> <div class="row mb32">
<div class='col-md-12 o_website_sale_rightfit'> <div class='col-md-12 o_website_sale_rightfit'>
<h2 class="mb8 mt8">Extra Step</h2> <h2 class="mb8 mt8">Extra Step</h2>
<form action="/website_form/" method="post" class="s_website_form form-horizontal container-fluid" enctype="multipart/form-data" data-force_action="shop.sale.order" data-model_name="sale.order" data-success_page="/shop/payment"> <form action="/website_form/" method="post" class="s_website_form form-horizontal container-fluid" enctype="multipart/form-data" data-force_action="shop.sale.order" data-model_name="sale.order" data-success_page="/shop/payment">
@ -962,7 +975,7 @@
<t t-set="step" t-value="10" /> <t t-set="step" t-value="10" />
</t> </t>
</div> </div>
<div class="row"> <div class="row mb32">
<div class="col-md-12 o_website_sale_rightfit"> <div class="col-md-12 o_website_sale_rightfit">
<h2 class="mb8 mt8">Shopping Cart</h2> <h2 class="mb8 mt8">Shopping Cart</h2>
<div t-if="abandoned_proceed or access_token" class="mt8 mb8 alert alert-info"> <!-- abandoned cart choices --> <div t-if="abandoned_proceed or access_token" class="mt8 mb8 alert alert-info"> <!-- abandoned cart choices -->
@ -1106,7 +1119,7 @@
<t t-set="step" t-value="20" /> <t t-set="step" t-value="20" />
</t> </t>
</div> </div>
<div class="row"> <div class="row mb32">
<div class="col-md-12"> <div class="col-md-12">
<h2 class="page-header mt8">Billing Address</h2> <h2 class="page-header mt8">Billing Address</h2>
</div> </div>
@ -1205,7 +1218,7 @@
<t t-set="step" t-value="20" /> <t t-set="step" t-value="20" />
</t> </t>
</div> </div>
<div class="row"> <div class="row mb32">
<t t-if="mode == ('new', 'billing')"> <t t-if="mode == ('new', 'billing')">
<h2 class="page-header mt8 ml16">Your Address <h2 class="page-header mt8 ml16">Your Address
<small> or </small> <small> or </small>
@ -1347,7 +1360,7 @@
<t t-set="step" t-value="40" /> <t t-set="step" t-value="40" />
</t> </t>
</div> </div>
<div class="row"> <div class="row mb32">
<div class='col-md-12 o_website_sale_rightfit'> <div class='col-md-12 o_website_sale_rightfit'>
<h2 class="mb8 mt8">Confirm Order</h2> <h2 class="mb8 mt8">Confirm Order</h2>
<table class="table table-striped table-condensed" id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line"> <table class="table table-striped table-condensed" id="cart_products" t-if="website_sale_order and website_sale_order.website_order_line">
@ -1465,9 +1478,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row mb32">
<div class="col-md-9"> <div class="col-md-9">
<div class="oe_cart"> <div class="oe_cart mb32">
<h3 class="mt32 text-left"> <h3 class="mt32 text-left">
<strong>Order Details:</strong> <strong>Order Details:</strong>
</h3> </h3>
@ -1879,9 +1892,11 @@
active="False" customize_show="True" name="Product Tags's Filter"> active="False" customize_show="True" name="Product Tags's Filter">
<xpath expr="//form[hasclass('js_attributes')]" position="inside"> <xpath expr="//form[hasclass('js_attributes')]" position="inside">
<t t-if="tags"> <t t-if="tags">
<div id="tags_div"> <div id="tags_div" class="mt32">
<div class="filter_title"> <div class="filter_title">
<strong>Tags</strong> <h4 class="title-block">
<span>Tags</span>
</h4>
</div> </div>
<t t-foreach="tags" t-as="tag"> <t t-foreach="tags" t-as="tag">
<label class="product-tag btn btn-primary btn-xs mb8"> <label class="product-tag btn btn-primary btn-xs mb8">
@ -1901,9 +1916,11 @@
active="False" customize_show="True" name="Product Brand's Filter"> active="False" customize_show="True" name="Product Brand's Filter">
<xpath expr="//form[hasclass('js_attributes')]" position="inside"> <xpath expr="//form[hasclass('js_attributes')]" position="inside">
<t t-if="brands"> <t t-if="brands">
<div id="brands_div"> <div id="brands_div" class="mt32">
<div class="filter_title"> <div class="filter_title">
<strong>Brands</strong> <h4 class="title-block">
<span>Brands</span>
</h4>
</div> </div>
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
<t t-foreach="brands" t-as="brand"> <t t-foreach="brands" t-as="brand">
@ -1911,7 +1928,7 @@
<label style="margin: 0 40px;"> <label style="margin: 0 40px;">
<input type="checkbox" name="brands" <input type="checkbox" name="brands"
t-att-value="brand.id" t-att-checked="'checked' if brand.id in brand_set else None" /> t-att-value="brand.id" t-att-checked="'checked' if brand.id in brand_set else None" />
<span style="font-weight: normal" t-field="brand.name" /> <label style="font-weight: normal" t-field="brand.name" />
</label> </label>
</li> </li>
</t> </t>