@@ -323,7 +322,7 @@
purchase.order.tree
purchase.order
-
+
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index f92dbd8a48a..dedee77e8a1 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -274,10 +274,10 @@
[[ formatLang(line.product_qty ) ]] [[ line.product_uom.name ]]
- [[ formatLang(line.price_unit, digits=get_digits(dp='Purchase Price') ) ]]
+ [[ formatLang(line.price_unit, digits=get_digits(dp='Product Price') ) ]]
- [[ formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'), currency_obj=o.pricelist_id.currency_id ) ]]
+ [[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]
@@ -293,7 +293,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Purchase Price'), currency_obj=o.pricelist_id.currency_id ) ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id ) ]]
@@ -306,7 +306,7 @@
Taxes :
- [[ formatLang(o.amount_tax, dp='Purchase Price', currency_obj=o.pricelist_id.currency_id) ]]
+ [[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]
@@ -319,7 +319,7 @@
Total :
- [[ formatLang(o.amount_total, digits=get_digits(dp='Purchase Price') , currency_obj=o.pricelist_id.currency_id) ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account') , currency_obj=o.pricelist_id.currency_id) ]]
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py
index f7d73bfb739..4ab6251c7a2 100644
--- a/addons/purchase/report/purchase_report.py
+++ b/addons/purchase/report/purchase_report.py
@@ -35,7 +35,6 @@ class purchase_report(osv.osv):
'name': fields.char('Year',size=64,required=False, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'state': fields.selection([('draft', 'Request for Quotation'),
- ('wait', 'Waiting'),
('confirmed', 'Waiting Supplier Ack'),
('approved', 'Approved'),
('except_picking', 'Shipping Exception'),
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 4acbfaa49c4..6beac5a4cd0 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -59,21 +59,12 @@ class purchase_config_settings(osv.osv_memory):
help="""Purchase Requisitions are used when you want to request quotations from several suppliers for a given set of products.
You can configure per product if you directly do a Request for Quotation
to one supplier or if you want a purchase requisition to negotiate with several suppliers."""),
- 'decimal_precision': fields.integer('specify decimal precision on price',help="As an example, a decimal precision of 2 will allow prices like: 9.99 EUR, whereas a decimal precision of 4 will allow prices like: 0.0231 EUR per unit."),
}
_defaults = {
'default_invoice_method': 'manual',
}
- def get_default_dp(self, cr, uid, fields, context=None):
- dp = self.pool.get('ir.model.data').get_object(cr,uid, 'product','decimal_purchase')
- return {'decimal_precision': dp.digits}
-
- def set_default_dp(self, cr, uid, ids, context=None):
- config = self.browse(cr, uid, ids[0], context)
- dp = self.pool.get('ir.model.data').get_object(cr,uid, 'product','decimal_purchase')
- dp.write({'digits': config.decimal_precision})
diff --git a/addons/purchase/res_config_view.xml b/addons/purchase/res_config_view.xml
index a490bea557c..23d89f1a7f1 100644
--- a/addons/purchase/res_config_view.xml
+++ b/addons/purchase/res_config_view.xml
@@ -32,10 +32,6 @@
-
-
-
-
diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py
index 9d9350e3257..cf0294730a7 100644
--- a/addons/purchase_requisition/purchase_requisition.py
+++ b/addons/purchase_requisition/purchase_requisition.py
@@ -69,7 +69,7 @@ class purchase_requisition(osv.osv):
purchase_order_obj = self.pool.get('purchase.order')
for purchase in self.browse(cr, uid, ids, context=context):
for purchase_id in purchase.purchase_ids:
- if str(purchase_id.state) in('draft','wait'):
+ if str(purchase_id.state) in('draft'):
purchase_order_obj.action_cancel(cr,uid,[purchase_id.id])
self.write(cr, uid, ids, {'state': 'cancel'})
self.cancel_send_note(cr, uid, ids, context=context)
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 8fecc17e62c..9f7ba06db95 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -266,13 +266,13 @@
[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) ]] [[ line.product_uos and line.product_uos.name or line.product_uom.name ]]
- [[ formatLang(line.price_unit ) ]]
+ [[ formatLang(line.price_unit , digits=get_digits(dp='Product Price'))]]
- [[ formatLang(line.discount) ]]
+ [[ formatLang(line.discount, digits=get_digits(dp='Discount'))]]
- [[ formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'), currency_obj=o.pricelist_id.currency_id) ]]
+ [[ formatLang(line.price_subtotal, digits=get_digits(dp='Account'), currency_obj=o.pricelist_id.currency_id) ]]
@@ -288,7 +288,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]
+ [[ formatLang(o.amount_untaxed, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]
@@ -301,7 +301,7 @@
Taxes :
- [[ formatLang(o.amount_tax, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]
+ [[ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]
@@ -314,7 +314,7 @@
Total :
- [[ formatLang(o.amount_total, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) ]]
+ [[ formatLang(o.amount_total, dp='Account', currency_obj=o.pricelist_id.currency_id) ]]
diff --git a/addons/sale/res_config.py b/addons/sale/res_config.py
index 50c8a32cfa6..0a2e3a49f62 100644
--- a/addons/sale/res_config.py
+++ b/addons/sale/res_config.py
@@ -98,17 +98,7 @@ class sale_configuration(osv.osv_memory):
'module_project_timesheet': fields.boolean("Project Timesheet"),
'module_project_mrp': fields.boolean("Project MRP"),
'module_project': fields.boolean("Project"),
- 'decimal_precision': fields.integer("Decimal precision on prices:",help="As an example, a decimal precision of 2 will allow prices like: 9.99 EUR, whereas a decimal precision of 4 will allow prices like: 0.0231 EUR per unit."),
}
- def _check_decimal(self, cr, uid, ids, context=None):
- for decimal in self.browse(cr, uid, ids, context=context):
- if decimal.decimal_precision > 20:
- return False
- return True
-
- _constraints = [
- (_check_decimal, 'Digits must be between 0 to 20 ', ['decimal_precision']),
- ]
def default_get(self, cr, uid, fields, context=None):
ir_model_data = self.pool.get('ir.model.data')
@@ -139,14 +129,6 @@ class sale_configuration(osv.osv_memory):
'time_unit': _get_default_time_unit,
}
- def get_default_dp(self, cr, uid, fields, context=None):
- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_sale')
- return {'decimal_precision': dp.digits}
-
- def set_default_dp(self, cr, uid, ids, context=None):
- config = self.browse(cr, uid, ids[0], context)
- dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_sale')
- dp.write({'digits': config.decimal_precision})
def set_sale_defaults(self, cr, uid, ids, context=None):
ir_values = self.pool.get('ir.values')
diff --git a/addons/sale/res_config_view.xml b/addons/sale/res_config_view.xml
index 37d58be5f0f..e07fcccedb2 100644
--- a/addons/sale/res_config_view.xml
+++ b/addons/sale/res_config_view.xml
@@ -95,10 +95,6 @@
-
-
-
-
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 722b22ba602..566b1ea2caa 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -247,19 +247,19 @@ class sale_order(osv.osv):
fnct_search=_invoiced_search, type='boolean', help="It indicates that an invoice has been paid."),
'note': fields.text('Terms and conditions'),
- 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Sale Price'), string='Untaxed Amount',
+ 'amount_untaxed': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Untaxed Amount',
store = {
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
},
multi='sums', help="The amount without tax."),
- 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Sale Price'), string='Taxes',
+ 'amount_tax': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Taxes',
store = {
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
},
multi='sums', help="The tax amount."),
- 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Sale Price'), string='Total',
+ 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Total',
store = {
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
@@ -1114,8 +1114,8 @@ class sale_order_line(osv.osv):
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
'invoiced': fields.boolean('Invoiced', readonly=True),
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
- 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
- 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Sale Price')),
+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),
+ 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
help="If 'on order', it triggers a procurement when the sale order is confirmed to create a task, purchase order or manufacturing order linked to this sale order line."),
@@ -1127,7 +1127,7 @@ class sale_order_line(osv.osv):
'product_uos': fields.many2one('product.uom', 'Product UoS'),
'product_packaging': fields.many2one('product.packaging', 'Packaging'),
'move_ids': fields.one2many('stock.move', 'sale_line_id', 'Inventory Moves', readonly=True),
- 'discount': fields.float('Discount', digits=(16, 2), readonly=True, states={'draft': [('readonly', False)]}),
+ 'discount': fields.float('Discount (%)', digits_compute= dp.get_precision('Discount'), readonly=True, states={'draft': [('readonly', False)]}),
'number_packages': fields.function(_number_packages, type='integer', string='Number Packages'),
'th_weight': fields.float('Weight', readonly=True, states={'draft': [('readonly', False)]}),
'state': fields.selection([('cancel', 'Cancelled'),('draft', 'Draft'),('confirmed', 'Confirmed'),('exception', 'Exception'),('done', 'Done')], 'Status', required=True, readonly=True,
@@ -1205,7 +1205,7 @@ class sale_order_line(osv.osv):
pu = 0.0
if uosqty:
pu = round(line.price_unit * line.product_uom_qty / uosqty,
- self.pool.get('decimal.precision').precision_get(cr, uid, 'Sale Price'))
+ self.pool.get('decimal.precision').precision_get(cr, uid, 'Product Price'))
fpos = line.order_id.fiscal_position or False
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
if not account_id:
diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py
index 0952d820ebe..a672c6b680a 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.py
+++ b/addons/sale/wizard/sale_make_invoice_advance.py
@@ -39,7 +39,7 @@ class sale_advance_payment_inv(osv.osv_memory):
'product_id': fields.many2one('product.product', 'Advance Product',
help="""Select a product of type service which is called 'Advance Product'.
You may have to create it and set it as a default value on this field."""),
- 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Sale Price'),
+ 'amount': fields.float('Advance Amount', digits_compute= dp.get_precision('Account'),
help="The amount to be invoiced in advance."),
}
diff --git a/addons/share/static/src/js/share.js b/addons/share/static/src/js/share.js
index 33aa3d1aab9..6cc12a5bfa8 100644
--- a/addons/share/static/src/js/share.js
+++ b/addons/share/static/src/js/share.js
@@ -35,19 +35,19 @@ openerp.share = function(session) {
}
function has_share(yes, no) {
- if (!session.connection.share_flag) {
- session.connection.share_flag = $.Deferred(function() {
+ if (!session.session.share_flag) {
+ session.session.share_flag = $.Deferred(function() {
var func = new session.web.Model("share.wizard").get_func("has_share");
- func(session.connection.uid).pipe(function(res) {
+ func(session.session.uid).pipe(function(res) {
if(res) {
- session.connection.share_flag.resolve();
+ session.session.share_flag.resolve();
} else {
- session.connection.share_flag.reject();
+ session.session.share_flag.reject();
}
});
});
}
- session.connection.share_flag.done(yes).fail(no);
+ session.session.share_flag.done(yes).fail(no);
}
/* Extend the Sidebar to add Share and Embed links in the 'More' menu */
diff --git a/addons/web_linkedin/static/src/js/linkedin.js b/addons/web_linkedin/static/src/js/linkedin.js
index 977e7a60cbb..c15b995bff9 100644
--- a/addons/web_linkedin/static/src/js/linkedin.js
+++ b/addons/web_linkedin/static/src/js/linkedin.js
@@ -78,7 +78,7 @@ openerp.web_linkedin = function(instance) {
}, _.bind(this.linkedin_disabled, this));
},
linkedin_disabled: function() {
- if (instance.connection.uid !== 1) {
+ if (instance.session.uid !== 1) {
instance.web.dialog($(QWeb.render("LinkedIn.DisabledWarning")), {
title: _t("LinkedIn is not enabled"),
buttons: [