-

+
@@ -239,7 +239,7 @@
-

+
Feature One
Adapt these three columns to fit you design need.
@@ -248,7 +248,7 @@
-

+
Feature Two
To add a fourth column, reduce the size of these
@@ -258,7 +258,7 @@
-

+
Feature Three
Delete the above image or replace it with a picture
@@ -307,7 +307,7 @@
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index 9362687c9a7..07b7a383c53 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -167,8 +167,8 @@
Create a
free website with
Odoo
-
- Copyright ©
Company name
+
+ Copyright © Company name
@@ -363,7 +363,7 @@
-
+
diff --git a/addons/website_event_sale/models/sale_order.py b/addons/website_event_sale/models/sale_order.py
index 06fc90e8874..e892c51ccc3 100644
--- a/addons/website_event_sale/models/sale_order.py
+++ b/addons/website_event_sale/models/sale_order.py
@@ -42,7 +42,7 @@ class sale_order(osv.Model):
values['event_id'] = ticket.event_id.id
values['event_ticket_id'] = ticket.id
values['price_unit'] = ticket.price
- values['name'] = "%s: %s" % (ticket.event_id.name, ticket.name)
+ values['name'] = "%s\n%s" % (ticket.event_id.display_name, ticket.name)
return values
diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py
index 3671ba16fb7..6c51dd0febc 100644
--- a/addons/website_quote/controllers/main.py
+++ b/addons/website_quote/controllers/main.py
@@ -142,6 +142,8 @@ class sale_quote(http.Controller):
order = request.registry.get('sale.order').browse(request.cr, SUPERUSER_ID, order_id)
if token != order.access_token:
return request.website.render('website.404')
+ if order.state not in ['draft', 'sent']:
+ return request.website.render('website.http_error', {'status_code': 'Forbidden', 'status_message': _('You cannot add options to a confirmed order.')})
option_obj = request.registry.get('sale.order.option')
option = option_obj.browse(request.cr, SUPERUSER_ID, option_id)
diff --git a/addons/website_quote/views/website_quotation.xml b/addons/website_quote/views/website_quotation.xml
index e7669927a71..bce804af470 100644
--- a/addons/website_quote/views/website_quotation.xml
+++ b/addons/website_quote/views/website_quotation.xml
@@ -457,7 +457,7 @@
-
+ |
diff --git a/addons/website_sale/models/sale_order.py b/addons/website_sale/models/sale_order.py
index ddda911f469..e8b91728029 100644
--- a/addons/website_sale/models/sale_order.py
+++ b/addons/website_sale/models/sale_order.py
@@ -63,7 +63,7 @@ class sale_order(osv.Model):
values['name'] = line.name
else:
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
- values['name'] = product.description_sale or product.name
+ values['name'] = "%s\n%s" % (product.display_name, product.description_sale)
values['product_id'] = product_id
values['order_id'] = order_id
diff --git a/addons/website_sale/static/src/css/website_sale.css b/addons/website_sale/static/src/css/website_sale.css
index 9cf135a66b5..4aca45b7f18 100644
--- a/addons/website_sale/static/src/css/website_sale.css
+++ b/addons/website_sale/static/src/css/website_sale.css
@@ -193,6 +193,79 @@
height: 570px; }
.col-md-9 .oe-height-8 {
height: 760px; } }
+/* ---- Cart ---- */
+.oe_cart a span.visible-xs-inline, #modal_optional_products a span.visible-xs-inline {
+ display: none !important;
+}
+
+.oe_cart a span.hidden-xs, #modal_optional_products a span.hidden-xs {
+ display: inline !important;
+}
+
+.oe_cart table td:first-child {
+ min-width: 76px;
+}
+
+@media (max-width: 992px) {
+ #modal_optional_products table:last-child td:last-child {
+ overflow: hidden;
+ }
+ #modal_optional_products table:last-child td:nth-child(2) {
+ width: 50%;
+ }
+ #modal_optional_products table:last-child td:nth-child(3) {
+ width: 20%;
+ }
+ #modal_optional_products table:last-child td:last-child, #modal_optional_products table:last-child td:nth-last-child(2) {
+ width: 15%;
+ }
+}
+@media (max-width: 500px) {
+ .oe_website_sale .oe_website_spinner {
+ margin: auto;
+ }
+
+ .oe_cart table, #modal_optional_products table {
+ display: inline-block;
+ }
+ .oe_cart table thead, #modal_optional_products table thead {
+ display: none;
+ }
+ .oe_cart table tbody, .oe_cart table tr, .oe_cart table td, #modal_optional_products table tbody, #modal_optional_products table tr, #modal_optional_products table td {
+ float: left;
+ width: 100% !important;
+ display: inline-block;
+ }
+ .oe_cart table td:first-child, #modal_optional_products table td:first-child {
+ display: none;
+ }
+ .oe_cart table td:nth-child(2), #modal_optional_products table td:nth-child(2) {
+ border-top-style: double;
+ border-top-width: 6px;
+ }
+ .oe_cart table td:last-child, #modal_optional_products table td:last-child {
+ margin-bottom: 16px;
+ }
+ .oe_cart table:last-child tr:last-child td:last-child, #modal_optional_products table:last-child tr:last-child td:last-child {
+ margin-bottom: 0;
+ }
+ .oe_cart table td:last-child, .oe_cart table td:nth-last-child(2), #modal_optional_products table td:last-child, #modal_optional_products table td:nth-last-child(2) {
+ width: 50% !important;
+ height: 46px;
+ text-align: center;
+ }
+
+ #modal_optional_products table:last-child td:nth-child(3) > div {
+ float: none !important;
+ }
+
+ .oe_cart a span.hidden-xs, #modal_optional_products a span.hidden-xs {
+ display: none !important;
+ }
+ .oe_cart a span.visible-xs-inline, #modal_optional_products a span.visible-xs-inline {
+ display: inline !important;
+ }
+}
/* ---- Product list style ---- */
@media (min-width: 400px) {
.oe_product.oe_list {
diff --git a/addons/website_sale/static/src/css/website_sale.sass b/addons/website_sale/static/src/css/website_sale.sass
index 8c5abcfa4d0..d46881c869f 100644
--- a/addons/website_sale/static/src/css/website_sale.sass
+++ b/addons/website_sale/static/src/css/website_sale.sass
@@ -218,6 +218,58 @@
.oe-height-8
height: 760px
+/* ---- Cart ---- */
+.oe_cart, #modal_optional_products
+ a span.visible-xs-inline
+ display: none !important
+.oe_cart, #modal_optional_products
+ a span.hidden-xs
+ display: inline !important
+
+.oe_cart table td:first-child
+ min-width: 76px
+
+@media (max-width: 992px)
+ #modal_optional_products table:last-child
+ td:last-child
+ overflow: hidden
+ td:nth-child(2)
+ width: 50%
+ td:nth-child(3)
+ width: 20%
+ td:last-child, td:nth-last-child(2)
+ width: 15%
+@media (max-width: 500px)
+ .oe_website_sale .oe_website_spinner
+ margin: auto
+ .oe_cart table, #modal_optional_products table
+ display: inline-block
+ thead
+ display: none
+ tbody, tr, td
+ float: left
+ width: 100% !important
+ display: inline-block
+ td:first-child
+ display: none
+ td:nth-child(2)
+ border-top-style: double
+ border-top-width: 6px
+ td:last-child
+ margin-bottom: 16px
+ &:last-child tr:last-child td:last-child
+ margin-bottom: 0
+ td:last-child, td:nth-last-child(2)
+ width: 50% !important
+ height: 46px
+ text-align: center
+ #modal_optional_products table:last-child td:nth-child(3) > div
+ float: none !important
+ .oe_cart a, #modal_optional_products a
+ span.hidden-xs
+ display: none !important
+ span.visible-xs-inline
+ display: inline !important
/* ---- Product list style ---- */
@media (min-width: 400px)
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index 172638f5712..626b19c178b 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -70,7 +70,7 @@
- |
@@ -653,7 +653,7 @@
- Process Checkout
+ Process CheckoutCheckout
@@ -736,7 +736,7 @@
- Continue Shopping
+ Continue ShoppingContinue
diff --git a/addons/website_sale_options/views/templates.xml b/addons/website_sale_options/views/templates.xml
index cc9319d6185..89c6e557530 100644
--- a/addons/website_sale_options/views/templates.xml
+++ b/addons/website_sale_options/views/templates.xml
@@ -61,7 +61,7 @@
"widget": "monetary",
"from_currency": "website.currency_id",
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
- }'/>
+ }'/>
ul {
margin-bottom: 2em;
}
@media (min-width: 992px) {
- .stripe .section > *,
- .stripe .section > .force-left {
+ .stripe .section:not(.force-right) > *,
+ .stripe .section:not(.force-right) > .force-left {
width: 49%;
float: left;
clear: left;
}
- .stripe .section > .force-right {
+ .stripe .section:not(.force-right) > .force-right {
padding-left: 1em;
padding-right: 1em;
}
- .stripe .section > .force-right,
- .stripe .section > [class*=highlight] {
+ .stripe .section:not(.force-right) > .force-right,
+ .stripe .section:not(.force-right) > [class*=highlight] {
float: none;
clear: none;
margin-left: 50%;
width: 50%;
color: #eeeeee;
}
- .stripe .section > .force-right a,
- .stripe .section > [class*=highlight] a {
+ .stripe .section:not(.force-right) > .force-right legend,
+ .stripe .section:not(.force-right) > [class*=highlight] legend {
+ color: inherit;
+ }
+ .stripe .section:not(.force-right) > .force-right input,
+ .stripe .section:not(.force-right) > [class*=highlight] input {
+ color: inherit;
+ background-color: #555555;
+ }
+ .stripe .section:not(.force-right) > .force-right a,
+ .stripe .section:not(.force-right) > [class*=highlight] a {
color: #d9a8cc;
}
- .stripe .section > .force-right code,
- .stripe .section > [class*=highlight] code,
- .stripe .section > .force-right .literal,
- .stripe .section > [class*=highlight] .literal {
+ .stripe .section:not(.force-right) > .force-right code,
+ .stripe .section:not(.force-right) > [class*=highlight] code,
+ .stripe .section:not(.force-right) > .force-right .literal,
+ .stripe .section:not(.force-right) > [class*=highlight] .literal {
color: #f9f2f4;
background-color: #555555;
}
- .stripe .section > .force-right:not(.highlight-json) .highlight,
- .stripe .section > [class*=highlight]:not(.highlight-json) .highlight {
+ .stripe .section:not(.force-right) > .force-right:not(.highlight-json) .highlight,
+ .stripe .section:not(.force-right) > [class*=highlight]:not(.highlight-json) .highlight {
border-bottom-color: #777777;
}
- .stripe .section > .force-right.admonition,
- .stripe .section > [class*=highlight].admonition {
+ .stripe .section:not(.force-right) > .force-right.admonition,
+ .stripe .section:not(.force-right) > [class*=highlight].admonition {
margin-left: 51%;
width: 49%;
border-top-color: #777777;
border-bottom-color: #777777;
border-right-color: #777777;
}
- .stripe .section > .force-right .highlight,
- .stripe .section > [class*=highlight] .highlight {
+ .stripe .section:not(.force-right) > .force-right .highlight,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight {
border-color: #555555;
border-style: solid;
border-width: 1px 0;
@@ -6930,302 +6939,302 @@ td.field-body > ul {
/* Name.Variable.Instance */
/* Literal.Number.Integer.Long */
}
- .stripe .section > .force-right .highlight .lineno,
- .stripe .section > [class*=highlight] .highlight .lineno {
+ .stripe .section:not(.force-right) > .force-right .highlight .lineno,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .lineno {
color: #586e75;
}
- .stripe .section > .force-right .highlight .c,
- .stripe .section > [class*=highlight] .highlight .c {
+ .stripe .section:not(.force-right) > .force-right .highlight .c,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .c {
color: #586e75;
}
- .stripe .section > .force-right .highlight .err,
- .stripe .section > [class*=highlight] .highlight .err {
+ .stripe .section:not(.force-right) > .force-right .highlight .err,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .err {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .g,
- .stripe .section > [class*=highlight] .highlight .g {
+ .stripe .section:not(.force-right) > .force-right .highlight .g,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .g {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .k,
- .stripe .section > [class*=highlight] .highlight .k {
+ .stripe .section:not(.force-right) > .force-right .highlight .k,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .k {
color: #859900;
}
- .stripe .section > .force-right .highlight .l,
- .stripe .section > [class*=highlight] .highlight .l {
+ .stripe .section:not(.force-right) > .force-right .highlight .l,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .l {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .n,
- .stripe .section > [class*=highlight] .highlight .n {
+ .stripe .section:not(.force-right) > .force-right .highlight .n,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .n {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .o,
- .stripe .section > [class*=highlight] .highlight .o {
+ .stripe .section:not(.force-right) > .force-right .highlight .o,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .o {
color: #859900;
}
- .stripe .section > .force-right .highlight .x,
- .stripe .section > [class*=highlight] .highlight .x {
+ .stripe .section:not(.force-right) > .force-right .highlight .x,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .x {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .p,
- .stripe .section > [class*=highlight] .highlight .p {
+ .stripe .section:not(.force-right) > .force-right .highlight .p,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .p {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .cm,
- .stripe .section > [class*=highlight] .highlight .cm {
+ .stripe .section:not(.force-right) > .force-right .highlight .cm,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .cm {
color: #586e75;
}
- .stripe .section > .force-right .highlight .cp,
- .stripe .section > [class*=highlight] .highlight .cp {
+ .stripe .section:not(.force-right) > .force-right .highlight .cp,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .cp {
color: #859900;
}
- .stripe .section > .force-right .highlight .c1,
- .stripe .section > [class*=highlight] .highlight .c1 {
+ .stripe .section:not(.force-right) > .force-right .highlight .c1,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .c1 {
color: #586e75;
}
- .stripe .section > .force-right .highlight .cs,
- .stripe .section > [class*=highlight] .highlight .cs {
+ .stripe .section:not(.force-right) > .force-right .highlight .cs,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .cs {
color: #859900;
}
- .stripe .section > .force-right .highlight .gd,
- .stripe .section > [class*=highlight] .highlight .gd {
+ .stripe .section:not(.force-right) > .force-right .highlight .gd,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gd {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .ge,
- .stripe .section > [class*=highlight] .highlight .ge {
+ .stripe .section:not(.force-right) > .force-right .highlight .ge,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .ge {
color: #cccccc;
font-style: italic;
}
- .stripe .section > .force-right .highlight .gr,
- .stripe .section > [class*=highlight] .highlight .gr {
+ .stripe .section:not(.force-right) > .force-right .highlight .gr,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gr {
color: #dc322f;
}
- .stripe .section > .force-right .highlight .gh,
- .stripe .section > [class*=highlight] .highlight .gh {
+ .stripe .section:not(.force-right) > .force-right .highlight .gh,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gh {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .gi,
- .stripe .section > [class*=highlight] .highlight .gi {
+ .stripe .section:not(.force-right) > .force-right .highlight .gi,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gi {
color: #859900;
}
- .stripe .section > .force-right .highlight .go,
- .stripe .section > [class*=highlight] .highlight .go {
+ .stripe .section:not(.force-right) > .force-right .highlight .go,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .go {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .gp,
- .stripe .section > [class*=highlight] .highlight .gp {
+ .stripe .section:not(.force-right) > .force-right .highlight .gp,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gp {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .gs,
- .stripe .section > [class*=highlight] .highlight .gs {
+ .stripe .section:not(.force-right) > .force-right .highlight .gs,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gs {
color: #cccccc;
font-weight: bold;
}
- .stripe .section > .force-right .highlight .gu,
- .stripe .section > [class*=highlight] .highlight .gu {
+ .stripe .section:not(.force-right) > .force-right .highlight .gu,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gu {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .gt,
- .stripe .section > [class*=highlight] .highlight .gt {
+ .stripe .section:not(.force-right) > .force-right .highlight .gt,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .gt {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .kc,
- .stripe .section > [class*=highlight] .highlight .kc {
+ .stripe .section:not(.force-right) > .force-right .highlight .kc,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .kc {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .kd,
- .stripe .section > [class*=highlight] .highlight .kd {
+ .stripe .section:not(.force-right) > .force-right .highlight .kd,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .kd {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .kn,
- .stripe .section > [class*=highlight] .highlight .kn {
+ .stripe .section:not(.force-right) > .force-right .highlight .kn,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .kn {
color: #859900;
}
- .stripe .section > .force-right .highlight .kp,
- .stripe .section > [class*=highlight] .highlight .kp {
+ .stripe .section:not(.force-right) > .force-right .highlight .kp,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .kp {
color: #859900;
}
- .stripe .section > .force-right .highlight .kr,
- .stripe .section > [class*=highlight] .highlight .kr {
+ .stripe .section:not(.force-right) > .force-right .highlight .kr,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .kr {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .kt,
- .stripe .section > [class*=highlight] .highlight .kt {
+ .stripe .section:not(.force-right) > .force-right .highlight .kt,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .kt {
color: #dc322f;
}
- .stripe .section > .force-right .highlight .ld,
- .stripe .section > [class*=highlight] .highlight .ld {
+ .stripe .section:not(.force-right) > .force-right .highlight .ld,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .ld {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .m,
- .stripe .section > [class*=highlight] .highlight .m {
+ .stripe .section:not(.force-right) > .force-right .highlight .m,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .m {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .s,
- .stripe .section > [class*=highlight] .highlight .s {
+ .stripe .section:not(.force-right) > .force-right .highlight .s,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .s {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .na,
- .stripe .section > [class*=highlight] .highlight .na {
+ .stripe .section:not(.force-right) > .force-right .highlight .na,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .na {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .nb,
- .stripe .section > [class*=highlight] .highlight .nb {
+ .stripe .section:not(.force-right) > .force-right .highlight .nb,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nb {
color: #b58900;
}
- .stripe .section > .force-right .highlight .nc,
- .stripe .section > [class*=highlight] .highlight .nc {
+ .stripe .section:not(.force-right) > .force-right .highlight .nc,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nc {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .no,
- .stripe .section > [class*=highlight] .highlight .no {
+ .stripe .section:not(.force-right) > .force-right .highlight .no,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .no {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .nd,
- .stripe .section > [class*=highlight] .highlight .nd {
+ .stripe .section:not(.force-right) > .force-right .highlight .nd,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nd {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .ni,
- .stripe .section > [class*=highlight] .highlight .ni {
+ .stripe .section:not(.force-right) > .force-right .highlight .ni,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .ni {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .ne,
- .stripe .section > [class*=highlight] .highlight .ne {
+ .stripe .section:not(.force-right) > .force-right .highlight .ne,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .ne {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .nf,
- .stripe .section > [class*=highlight] .highlight .nf {
+ .stripe .section:not(.force-right) > .force-right .highlight .nf,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nf {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .nl,
- .stripe .section > [class*=highlight] .highlight .nl {
+ .stripe .section:not(.force-right) > .force-right .highlight .nl,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nl {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .nn,
- .stripe .section > [class*=highlight] .highlight .nn {
+ .stripe .section:not(.force-right) > .force-right .highlight .nn,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nn {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .nx,
- .stripe .section > [class*=highlight] .highlight .nx {
+ .stripe .section:not(.force-right) > .force-right .highlight .nx,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nx {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .py,
- .stripe .section > [class*=highlight] .highlight .py {
+ .stripe .section:not(.force-right) > .force-right .highlight .py,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .py {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .nt,
- .stripe .section > [class*=highlight] .highlight .nt {
+ .stripe .section:not(.force-right) > .force-right .highlight .nt,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nt {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .nv,
- .stripe .section > [class*=highlight] .highlight .nv {
+ .stripe .section:not(.force-right) > .force-right .highlight .nv,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .nv {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .ow,
- .stripe .section > [class*=highlight] .highlight .ow {
+ .stripe .section:not(.force-right) > .force-right .highlight .ow,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .ow {
color: #859900;
}
- .stripe .section > .force-right .highlight .w,
- .stripe .section > [class*=highlight] .highlight .w {
+ .stripe .section:not(.force-right) > .force-right .highlight .w,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .w {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .mf,
- .stripe .section > [class*=highlight] .highlight .mf {
+ .stripe .section:not(.force-right) > .force-right .highlight .mf,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .mf {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .mh,
- .stripe .section > [class*=highlight] .highlight .mh {
+ .stripe .section:not(.force-right) > .force-right .highlight .mh,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .mh {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .mi,
- .stripe .section > [class*=highlight] .highlight .mi {
+ .stripe .section:not(.force-right) > .force-right .highlight .mi,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .mi {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .mo,
- .stripe .section > [class*=highlight] .highlight .mo {
+ .stripe .section:not(.force-right) > .force-right .highlight .mo,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .mo {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .sb,
- .stripe .section > [class*=highlight] .highlight .sb {
+ .stripe .section:not(.force-right) > .force-right .highlight .sb,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .sb {
color: #586e75;
}
- .stripe .section > .force-right .highlight .sc,
- .stripe .section > [class*=highlight] .highlight .sc {
+ .stripe .section:not(.force-right) > .force-right .highlight .sc,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .sc {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .sd,
- .stripe .section > [class*=highlight] .highlight .sd {
+ .stripe .section:not(.force-right) > .force-right .highlight .sd,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .sd {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .s2,
- .stripe .section > [class*=highlight] .highlight .s2 {
+ .stripe .section:not(.force-right) > .force-right .highlight .s2,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .s2 {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .se,
- .stripe .section > [class*=highlight] .highlight .se {
+ .stripe .section:not(.force-right) > .force-right .highlight .se,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .se {
color: #cb4b16;
}
- .stripe .section > .force-right .highlight .sh,
- .stripe .section > [class*=highlight] .highlight .sh {
+ .stripe .section:not(.force-right) > .force-right .highlight .sh,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .sh {
color: #cccccc;
}
- .stripe .section > .force-right .highlight .si,
- .stripe .section > [class*=highlight] .highlight .si {
+ .stripe .section:not(.force-right) > .force-right .highlight .si,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .si {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .sx,
- .stripe .section > [class*=highlight] .highlight .sx {
+ .stripe .section:not(.force-right) > .force-right .highlight .sx,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .sx {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .sr,
- .stripe .section > [class*=highlight] .highlight .sr {
+ .stripe .section:not(.force-right) > .force-right .highlight .sr,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .sr {
color: #dc322f;
}
- .stripe .section > .force-right .highlight .s1,
- .stripe .section > [class*=highlight] .highlight .s1 {
+ .stripe .section:not(.force-right) > .force-right .highlight .s1,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .s1 {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .ss,
- .stripe .section > [class*=highlight] .highlight .ss {
+ .stripe .section:not(.force-right) > .force-right .highlight .ss,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .ss {
color: #2aa198;
}
- .stripe .section > .force-right .highlight .bp,
- .stripe .section > [class*=highlight] .highlight .bp {
+ .stripe .section:not(.force-right) > .force-right .highlight .bp,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .bp {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .vc,
- .stripe .section > [class*=highlight] .highlight .vc {
+ .stripe .section:not(.force-right) > .force-right .highlight .vc,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .vc {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .vg,
- .stripe .section > [class*=highlight] .highlight .vg {
+ .stripe .section:not(.force-right) > .force-right .highlight .vg,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .vg {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .vi,
- .stripe .section > [class*=highlight] .highlight .vi {
+ .stripe .section:not(.force-right) > .force-right .highlight .vi,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .vi {
color: #268bd2;
}
- .stripe .section > .force-right .highlight .il,
- .stripe .section > [class*=highlight] .highlight .il {
+ .stripe .section:not(.force-right) > .force-right .highlight .il,
+ .stripe .section:not(.force-right) > [class*=highlight] .highlight .il {
color: #2aa198;
}
.stripe .body > .section > .section {
border-top: 1px solid #eeeeee;
}
- .stripe .section > h1,
- .stripe .section > h2,
- .stripe .section > h3,
- .stripe .section > h4,
- .stripe .section > h5,
- .stripe .section > h6 {
+ .stripe .section:not(.force-right) > h1,
+ .stripe .section:not(.force-right) > h2,
+ .stripe .section:not(.force-right) > h3,
+ .stripe .section:not(.force-right) > h4,
+ .stripe .section:not(.force-right) > h5,
+ .stripe .section:not(.force-right) > h6 {
max-width: 50%;
}
- .stripe .section > h1,
- .stripe .section > h2,
- .stripe .section > h3,
- .stripe .section > h4,
- .stripe .section > h5,
- .stripe .section > h6,
- .stripe .section > .section {
+ .stripe .section:not(.force-right) > h1,
+ .stripe .section:not(.force-right) > h2,
+ .stripe .section:not(.force-right) > h3,
+ .stripe .section:not(.force-right) > h4,
+ .stripe .section:not(.force-right) > h5,
+ .stripe .section:not(.force-right) > h6,
+ .stripe .section > .section:not(.force-right) {
position: relative;
width: auto;
float: none;
diff --git a/doc/_themes/odoodoc/static/style.less b/doc/_themes/odoodoc/static/style.less
index 763fe6027d3..bea588932d6 100644
--- a/doc/_themes/odoodoc/static/style.less
+++ b/doc/_themes/odoodoc/static/style.less
@@ -610,24 +610,31 @@ td.field-body {
// === columning only on medium+ ===
@media (min-width: @screen-md-min) {
// column 1
- .section > *,
- .section > .force-left {
+ .section:not(.force-right) > *,
+ .section:not(.force-right) > .force-left {
width: 49%;
float: left;
clear: left;
}
// column 2
- .section > .force-right {
+ .section:not(.force-right) > .force-right {
padding-left: 1em;
padding-right: 1em;
}
- .section > .force-right,
- .section > [class*=highlight] {
+ .section:not(.force-right) > .force-right,
+ .section:not(.force-right) > [class*=highlight] {
float: none;
clear: none;
margin-left: 50%;
width: 50%;
color: @color-right;
+ legend {
+ color: inherit;
+ }
+ input {
+ color: inherit;
+ background-color: @gray;
+ }
a {
color: lighten(@link-color, 30%);
}
@@ -728,13 +735,16 @@ td.field-body {
.body > .section > .section {
border-top: 1px solid @color-right;
}
- .section > h1, .section > h2, .section > h3, .section > h4, .section > h5,
- .section > h6 {
+ .section:not(.force-right) > h1, .section:not(.force-right) > h2,
+ .section:not(.force-right) > h3, .section:not(.force-right) > h4,
+ .section:not(.force-right) > h5, .section:not(.force-right) > h6 {
max-width: 50%;
}
- .section > h1, .section > h2, .section > h3, .section > h4, .section > h5,
- .section > h6, .section > .section {
+ .section:not(.force-right) > h1, .section:not(.force-right) > h2,
+ .section:not(.force-right) > h3, .section:not(.force-right) > h4,
+ .section:not(.force-right) > h5, .section:not(.force-right) > h6,
+ .section > .section:not(.force-right) {
position: relative;
width: auto;
float: none;
diff --git a/doc/cla/corporate/apertoso.md b/doc/cla/corporate/apertoso.md
new file mode 100644
index 00000000000..2d23bfd3e77
--- /dev/null
+++ b/doc/cla/corporate/apertoso.md
@@ -0,0 +1,16 @@
+Belgium, 2015-02-13
+
+Apertoso agrees to the terms of the Odoo Corporate Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Jos De Graeve Jos.DeGraeve@apertoso.be https://github.com/apertoso
+
+List of contributors:
+
+Jos De Graeve Jos.DeGraeve@apertoso.be https://github.com/JosDeGraeve
+Maarten De Wispelaere Maarten.DeWispelaere https://github.com/bitprocessor
diff --git a/doc/cla/individual/dreispt.md b/doc/cla/individual/dreispt.md
new file mode 100644
index 00000000000..977de87dbd5
--- /dev/null
+++ b/doc/cla/individual/dreispt.md
@@ -0,0 +1,11 @@
+Lisbon, 2015-02-16
+
+I hereby agree to the terms of the Odoo Individual Contributor License
+Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this
+declaration.
+
+Signed,
+
+Daniel Reis dgreis@sapo.pt https://github.com/dreispt
diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py
index b09099721d0..67b65a63e7f 100644
--- a/openerp/addons/base/res/res_partner.py
+++ b/openerp/addons/base/res/res_partner.py
@@ -68,6 +68,10 @@ class format_address(object):
doc = etree.fromstring(arch)
for node in doc.xpath("//div[@class='address_format']"):
tree = etree.fromstring(v % {'city': _('City'), 'zip': _('ZIP'), 'state': _('State')})
+ for child in node.xpath("//field"):
+ if child.attrib.get('modifiers'):
+ for field in tree.xpath("//field[@name='%s']" % child.attrib.get('name')):
+ field.attrib['modifiers'] = child.attrib.get('modifiers')
node.getparent().replace(node, tree)
arch = etree.tostring(doc)
break
diff --git a/openerp/api.py b/openerp/api.py
index 3bd9c4e979b..1c1287653fa 100644
--- a/openerp/api.py
+++ b/openerp/api.py
@@ -890,6 +890,19 @@ class Environment(object):
if invalids:
raise UserError('Invalid cache for fields\n' + pformat(invalids))
+ @property
+ def recompute(self):
+ return self.all.recompute
+
+ @contextmanager
+ def norecompute(self):
+ tmp = self.all.recompute
+ self.all.recompute = False
+ try:
+ yield
+ finally:
+ self.all.recompute = tmp
+
class Environments(object):
""" A common object for all environments in a request. """
@@ -897,6 +910,7 @@ class Environments(object):
self.envs = WeakSet() # weak set of environments
self.todo = {} # recomputations {field: [records]}
self.mode = False # flag for draft/onchange
+ self.recompute = True
def add(self, env):
""" Add the environment `env`. """
diff --git a/openerp/models.py b/openerp/models.py
index 6fc74cea170..f82a4059373 100644
--- a/openerp/models.py
+++ b/openerp/models.py
@@ -3979,7 +3979,7 @@ class BaseModel(object):
self.pool[model_name]._store_set_values(cr, user, todo, fields_to_recompute, context)
# recompute new-style fields
- if context.get('recompute', True):
+ if recs.env.recompute and context.get('recompute', True):
recs.recompute()
self.step_workflow(cr, user, ids, context=context)
@@ -4226,7 +4226,7 @@ class BaseModel(object):
# check Python constraints
recs._validate_fields(vals)
- if context.get('recompute', True):
+ if recs.env.recompute and context.get('recompute', True):
result += self._store_get_values(cr, user, [id_new],
list(set(vals.keys() + self._inherits.values())),
context)
@@ -4239,7 +4239,7 @@ class BaseModel(object):
# recompute new-style fields
recs.recompute()
- if self._log_create and context.get('recompute', True):
+ if self._log_create and recs.env.recompute and context.get('recompute', True):
message = self._description + \
" '" + \
self.name_get(cr, user, [id_new], context=context)[0][1] + \
@@ -5635,12 +5635,13 @@ class BaseModel(object):
field, recs = self.env.get_todo()
# evaluate the fields to recompute, and save them to database
names = [f.name for f in field.computed_fields if f.store]
- for rec, rec1 in zip(recs, recs.with_context(recompute=False)):
+ for rec in recs:
try:
values = rec._convert_to_write({
name: rec[name] for name in names
})
- rec1._write(values)
+ with rec.env.norecompute():
+ rec._write(values)
except MissingError:
pass
# mark the computed fields as done
diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py
index c95e7625cac..3bf0c268961 100644
--- a/openerp/osv/fields.py
+++ b/openerp/osv/fields.py
@@ -736,57 +736,58 @@ class one2many(_column):
result = []
context = dict(context or {})
context.update(self._context)
- context['recompute'] = False # recomputation is done by outer create/write
if not values:
return
obj = obj.pool[self._obj]
- _table = obj._table
- for act in values:
- if act[0] == 0:
- act[2][self._fields_id] = id
- id_new = obj.create(cr, user, act[2], context=context)
- result += obj._store_get_values(cr, user, [id_new], act[2].keys(), context)
- elif act[0] == 1:
- obj.write(cr, user, [act[1]], act[2], context=context)
- elif act[0] == 2:
- obj.unlink(cr, user, [act[1]], context=context)
- elif act[0] == 3:
- inverse_field = obj._fields.get(self._fields_id)
- assert inverse_field, 'Trying to unlink the content of a o2m but the pointed model does not have a m2o'
- # if the model has on delete cascade, just delete the row
- if inverse_field.ondelete == "cascade":
+ rec = obj.browse(cr, user, [], context=context)
+ with rec.env.norecompute():
+ _table = obj._table
+ for act in values:
+ if act[0] == 0:
+ act[2][self._fields_id] = id
+ id_new = obj.create(cr, user, act[2], context=context)
+ result += obj._store_get_values(cr, user, [id_new], act[2].keys(), context)
+ elif act[0] == 1:
+ obj.write(cr, user, [act[1]], act[2], context=context)
+ elif act[0] == 2:
obj.unlink(cr, user, [act[1]], context=context)
- else:
- cr.execute('update '+_table+' set '+self._fields_id+'=null where id=%s', (act[1],))
- elif act[0] == 4:
- # table of the field (parent_model in case of inherit)
- field = obj.pool[self._obj]._fields[self._fields_id]
- field_model = field.base_field.model_name
- field_table = obj.pool[field_model]._table
- cr.execute("select 1 from {0} where id=%s and {1}=%s".format(field_table, self._fields_id), (act[1], id))
- if not cr.fetchone():
- # Must use write() to recompute parent_store structure if needed and check access rules
- obj.write(cr, user, [act[1]], {self._fields_id:id}, context=context or {})
- elif act[0] == 5:
- inverse_field = obj._fields.get(self._fields_id)
- assert inverse_field, 'Trying to unlink the content of a o2m but the pointed model does not have a m2o'
- # if the o2m has a static domain we must respect it when unlinking
- domain = self._domain(obj) if callable(self._domain) else self._domain
- extra_domain = domain or []
- ids_to_unlink = obj.search(cr, user, [(self._fields_id,'=',id)] + extra_domain, context=context)
- # If the model has cascade deletion, we delete the rows because it is the intended behavior,
- # otherwise we only nullify the reverse foreign key column.
- if inverse_field.ondelete == "cascade":
- obj.unlink(cr, user, ids_to_unlink, context=context)
- else:
- obj.write(cr, user, ids_to_unlink, {self._fields_id: False}, context=context)
- elif act[0] == 6:
- # Must use write() to recompute parent_store structure if needed
- obj.write(cr, user, act[2], {self._fields_id:id}, context=context or {})
- ids2 = act[2] or [0]
- cr.execute('select id from '+_table+' where '+self._fields_id+'=%s and id <> ALL (%s)', (id,ids2))
- ids3 = map(lambda x:x[0], cr.fetchall())
- obj.write(cr, user, ids3, {self._fields_id:False}, context=context or {})
+ elif act[0] == 3:
+ inverse_field = obj._fields.get(self._fields_id)
+ assert inverse_field, 'Trying to unlink the content of a o2m but the pointed model does not have a m2o'
+ # if the model has on delete cascade, just delete the row
+ if inverse_field.ondelete == "cascade":
+ obj.unlink(cr, user, [act[1]], context=context)
+ else:
+ cr.execute('update '+_table+' set '+self._fields_id+'=null where id=%s', (act[1],))
+ elif act[0] == 4:
+ # table of the field (parent_model in case of inherit)
+ field = obj.pool[self._obj]._fields[self._fields_id]
+ field_model = field.base_field.model_name
+ field_table = obj.pool[field_model]._table
+ cr.execute("select 1 from {0} where id=%s and {1}=%s".format(field_table, self._fields_id), (act[1], id))
+ if not cr.fetchone():
+ # Must use write() to recompute parent_store structure if needed and check access rules
+ obj.write(cr, user, [act[1]], {self._fields_id:id}, context=context or {})
+ elif act[0] == 5:
+ inverse_field = obj._fields.get(self._fields_id)
+ assert inverse_field, 'Trying to unlink the content of a o2m but the pointed model does not have a m2o'
+ # if the o2m has a static domain we must respect it when unlinking
+ domain = self._domain(obj) if callable(self._domain) else self._domain
+ extra_domain = domain or []
+ ids_to_unlink = obj.search(cr, user, [(self._fields_id,'=',id)] + extra_domain, context=context)
+ # If the model has cascade deletion, we delete the rows because it is the intended behavior,
+ # otherwise we only nullify the reverse foreign key column.
+ if inverse_field.ondelete == "cascade":
+ obj.unlink(cr, user, ids_to_unlink, context=context)
+ else:
+ obj.write(cr, user, ids_to_unlink, {self._fields_id: False}, context=context)
+ elif act[0] == 6:
+ # Must use write() to recompute parent_store structure if needed
+ obj.write(cr, user, act[2], {self._fields_id:id}, context=context or {})
+ ids2 = act[2] or [0]
+ cr.execute('select id from '+_table+' where '+self._fields_id+'=%s and id <> ALL (%s)', (id,ids2))
+ ids3 = map(lambda x:x[0], cr.fetchall())
+ obj.write(cr, user, ids3, {self._fields_id:False}, context=context or {})
return result
def search(self, cr, obj, args, name, value, offset=0, limit=None, uid=None, operator='like', context=None):
|