Skip to content

Commit

Permalink
[MERGE] forward port of branch saas-3 up to revid 9394 chs@openerp.co…
Browse files Browse the repository at this point in the history
…m-20140410103638-x7vajn70ewsfp0ck

bzr revid: chs@openerp.com-20140410110424-enhdg6pufhii56ni
  • Loading branch information
KangOl committed Apr 10, 2014
2 parents e521085 + bd78042 commit 3a7e003
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion addons/account/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_charts(self, cr, uid, context=None):

# try get the list on apps server
try:
apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com')
apps_server = self.pool.get('ir.module.module').get_apps_server(cr, uid, context=context)

up = urlparse.urlparse(apps_server)
url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie)
Expand Down
2 changes: 1 addition & 1 deletion addons/account_asset/account_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def copy(self, cr, uid, id, default=None, context=None):
default = {}
if context is None:
context = {}
default.update({'depreciation_line_ids': [], 'state': 'draft'})
default.update({'depreciation_line_ids': [], 'account_move_line_ids': [], 'history_ids': [], 'state': 'draft'})
return super(account_asset_asset, self).copy(cr, uid, id, default, context=context)

def _compute_entries(self, cr, uid, ids, period_id, context=None):
Expand Down
1 change: 1 addition & 0 deletions addons/analytic_user_function/analytic_user_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
class analytic_user_funct_grid(osv.osv):
_name="analytic.user.funct.grid"
_description= "Price per User"
_rec_name="user_id"
_columns={
'user_id': fields.many2one("res.users", "User", required=True,),
'product_id': fields.many2one("product.product", "Service", required=True,),
Expand Down
10 changes: 8 additions & 2 deletions addons/auth_oauth/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging

import simplejson
import urlparse
import werkzeug.utils
from werkzeug.exceptions import BadRequest

Expand Down Expand Up @@ -68,7 +69,8 @@ def list_providers(self):
def get_state(self, provider):
state = dict(
d=request.session.db,
p=provider['id']
p=provider['id'],
r=request.httprequest.full_path
)
token = request.params.get('token')
if token:
Expand Down Expand Up @@ -137,8 +139,12 @@ def signin(self, **kw):
cr.commit()
action = state.get('a')
menu = state.get('m')
redirect = state.get('r')
url = '/web'
if action:
if redirect and not redirect.startswith('/auth_oauth/signin') and \
(not redirect.startswith('/web/login') or 'redirect' in urlparse.urlsplit(redirect).query):
url = redirect
elif action:
url = '/web#action=%s' % action
elif menu:
url = '/web#menu_id=%s' % menu
Expand Down
2 changes: 1 addition & 1 deletion addons/auth_signup/auth_signup_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<field name="password"></field>
<field name="active" eval="False"/>
<!-- Avoid auto-including this user in any default group, just like a typical portal member -->
<field name="groups_id" eval="[(4,ref('base.group_portal'))]"/>
<field name="groups_id" eval="[(6, 0, [ref('base.group_portal')])]"/>
<!-- allow signuped users to have a alias -->
<field name="alias_name">_usertemplate</field>
</record>
Expand Down
5 changes: 3 additions & 2 deletions addons/pad/static/src/js/pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ openerp.pad = function(instance) {
event.preventDefault();
self.set("configured", true);
});
this.pad_loading_request = null;
},
initialize_content: function() {
var self = this;
Expand All @@ -30,14 +31,14 @@ openerp.pad = function(instance) {
},
render_value: function() {
var self = this;
this._configured_deferred.always(function() {
$.when(this._configured_deferred, this.pad_loading_request).always(function() {
if (! self.get('configured')) {
return;
};
var value = self.get('value');
if (self.get('effective_readonly')) {
if (_.str.startsWith(value, 'http')) {
this.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) {
self.pad_loading_request = self.view.dataset.call('pad_get_content', {url: value}).done(function(data) {
self.$('.oe_pad_content').removeClass('oe_pad_loading').html('<div class="oe_pad_readonly"><div>');
self.$('.oe_pad_readonly').html(data);
}).fail(function() {
Expand Down
3 changes: 2 additions & 1 deletion addons/payment/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
'version': '1.0',
'description': """Payment Acquirer Base Module""",
'author': 'OpenERP SA',
'depends': ['mail', 'account'],
'depends': ['account'],
'data': [
'views/payment_acquirer.xml',
'views/res_config_view.xml',
'security/ir.model.access.csv',
],
'installable': True,
'auto_install': True,
}
1 change: 1 addition & 0 deletions addons/product/product_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
</div>
<field name="company_id" groups="base.group_multi_company" widget="selection"
attrs="{'invisible': [('is_only_child', '=', False)]}"/>
<field name="active" />
</group>
</group>
<field name="description" placeholder="describe the product characteristics..."
Expand Down
1 change: 0 additions & 1 deletion addons/stock/product_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
<div attrs="{'invisible':[('type','=','service')]}">
<field name="produce_delay" class="oe_inline"/> days
</div>
<field name="active"/>
</group>
</group>
<xpath expr="//group[@string='Sale Conditions']" position="inside">
Expand Down
3 changes: 3 additions & 0 deletions addons/website/static/src/js/website.snippets.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,9 @@
start : function () {
var self = this;
this._super();
if (!self.$target.data("snippet-view")) {
this.$target.data("snippet-view", new website.snippet.animationRegistry.parallax(this.$target));
}
this.scroll();
this.$target.on('snippet-style-change snippet-style-preview', function () {
self.$target.data("snippet-view").set_values();
Expand Down
1 change: 1 addition & 0 deletions addons/website_quote/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ access_sale_quote_line_manager,sale.quote.line,model_sale_quote_line,base.group_
access_sale_quote_option,sale.quote.option,model_sale_quote_option,base.group_sale_salesman,1,0,0,0
access_sale_quote_option_manager,sale.quote.option,model_sale_quote_option,base.group_sale_manager,1,1,1,1
access_sale_order_option,sale.order.option,model_sale_order_option,base.group_sale_salesman,1,1,1,1
access_sale_order_option_all,sale.order.option,model_sale_order_option,,1,0,0,0
4 changes: 3 additions & 1 deletion addons/website_sale/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def from_partner(self, partner, address_type='billing'):
result = dict((prefix + field_name, getattr(partner, field_name)) for field_name in self.string_billing_fields if getattr(partner, field_name))
result[prefix + 'state_id'] = partner.state_id and partner.state_id.id or ''
result[prefix + 'country_id'] = partner.country_id and partner.country_id.id or ''
result[prefix + 'company'] = partner.parent_id and partner.parent_id.name or ''
result[prefix + 'company'] = partner.commercial_partner_id and partner.commercial_partner_id.is_company and partner.commercial_partner_id.name or ''
return result

def from_post(self, post):
Expand Down Expand Up @@ -383,6 +383,8 @@ def mycart(self, **post):
def add_cart(self, product_id, remove=None, **kw):
request.registry['website']._ecommerce_add_product_to_cart(request.cr, request.uid,
product_id=int(product_id),
number=float(kw.get('number',1)),
set_number=float(kw.get('set_number',-1)),
context=request.context)
return request.redirect("/shop/mycart")

Expand Down

0 comments on commit 3a7e003

Please sign in to comment.