summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-12-08 12:27:18 +0100
committerChristophe Simonis <chs@odoo.com>2016-12-08 12:27:18 +0100
commit1568c81269cb1f76e985fb9916579d894b97900a (patch)
tree10b1ee66b90843ed6075a90a8090bbc7a6ff4815 /addons
parent63d230b0070bea40681ce11bbafba127a79c9f49 (diff)
parentda5d6289114c0cf687681bde8debed6676698abf (diff)
[MERGE] forward port branch saas-6 up to da5d628
Diffstat (limited to 'addons')
-rw-r--r--addons/product/pricelist.py2
-rw-r--r--addons/stock/stock.py3
2 files changed, 2 insertions, 3 deletions
diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py
index 7047cebb1f6..8a88ee059c0 100644
--- a/addons/product/pricelist.py
+++ b/addons/product/pricelist.py
@@ -324,10 +324,12 @@ class product_pricelist_item(osv.osv):
'company_id': fields.related('pricelist_id','company_id',type='many2one',
readonly=True, relation='res.company', string='Company', store={
'product.pricelist': (_get_product_pricelist, ['company_id'], 30),
+ 'product.pricelist.item': (lambda self, cr, uid, ids, c=None: ids, ['pricelist_id'], 30),
}),
'currency_id': fields.related('pricelist_id', 'currency_id', type='many2one',
readonly=True, relation='res.currency', string='Currency', store={
'product.pricelist': (_get_product_pricelist, ['currency_id'], 30),
+ 'product.pricelist.item': (lambda self, cr, uid, ids, c=None: ids, ['pricelist_id'], 30),
}),
'date_start': fields.date('Start Date', help="Starting date for the pricelist item validation"),
'date_end': fields.date('End Date', help="Ending valid for the pricelist item validation"),
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index f305332e707..ae6b3888dc2 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -4278,7 +4278,6 @@ class stock_package(osv.osv):
context = dict(context or {}, active_ids=ids)
return self.pool.get("report").get_action(cr, uid, ids, 'stock.report_package_barcode_small', context=context)
-
def unpack(self, cr, uid, ids, context=None):
quant_obj = self.pool.get('stock.quant')
for package in self.browse(cr, uid, ids, context=context):
@@ -4286,8 +4285,6 @@ class stock_package(osv.osv):
quant_obj.write(cr, SUPERUSER_ID, quant_ids, {'package_id': package.parent_id.id or False}, context=context)
children_package_ids = [child_package.id for child_package in package.children_ids]
self.write(cr, uid, children_package_ids, {'parent_id': package.parent_id.id or False}, context=context)
- #delete current package since it contains nothing anymore
- self.unlink(cr, uid, ids, context=context)
return self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'stock', 'action_package_view', context=context)
def get_content(self, cr, uid, ids, context=None):