From f162ad8845ada71545bfcd79d5a77e923e904618 Mon Sep 17 00:00:00 2001
From: "rha@tinyerp.com" <>
Date: Mon, 3 Jan 2011 16:24:56 +0530
Subject: [PATCH 01/11] [Fix] stock: incoming shipments price is wrong
lp bug: https://launchpad.net/bugs/696372 fixed
bzr revid: rha@tinyerp.com-20110103105456-46dhel6b7b8891uc
---
addons/purchase/purchase.py | 3 +-
addons/stock/wizard/stock_partial_picking.py | 46 ++++++++++----------
2 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 0de19189fc3..6adb726b97a 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -455,6 +455,7 @@ class purchase_order(osv.osv):
'state': 'draft',
'purchase_line_id': order_line.id,
'company_id': order.company_id.id,
+ 'price_unit': order_line.price_unit
})
if order_line.move_dest_id:
self.pool.get('stock.move').write(cr, uid, [order_line.move_dest_id.id], {'location_id':order.location_id.id})
@@ -672,7 +673,7 @@ class purchase_order_line(osv.osv):
seller_delay = 0
prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context)[0][1]
- res = {}
+ res = {}
for s in prod.seller_ids:
if s.name.id == partner_id:
seller_delay = s.delay
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index ad75c142a96..305304e8c7e 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -32,24 +32,24 @@ class stock_partial_picking(osv.osv_memory):
'product_moves_out' : fields.one2many('stock.move.memory.out', 'wizard_id', 'Moves'),
'product_moves_in' : fields.one2many('stock.move.memory.in', 'wizard_id', 'Moves'),
}
-
+
def __is_in(self,cr, uid, pick_ids):
"""
@return: True if one of the moves has as picking type 'in'
"""
if not pick_ids:
return False
-
+
pick_obj = self.pool.get('stock.picking')
pick_ids = pick_obj.search(cr, uid, [('id','in',pick_ids)])
-
-
+
+
for pick in pick_obj.browse(cr, uid, pick_ids):
for move in pick.move_lines:
if pick.type == 'in' and move.product_id.cost_method == 'average':
return True
return False
-
+
def __get_picking_type(self, cr, uid, pick_ids):
if self.__is_in(cr, uid, pick_ids):
return "product_moves_in"
@@ -62,11 +62,11 @@ class stock_partial_picking(osv.osv_memory):
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
-
-
+
+
picking_ids = context.get('active_ids', False)
picking_type = self.__get_picking_type(cr, uid, picking_ids)
-
+
_moves_arch_lst = """
From e9f7a90ac82d9b5e2a84bcba94d989f098c044c4 Mon Sep 17 00:00:00 2001
From: "rha@tinyerp.com" <>
Date: Fri, 7 Jan 2011 14:41:58 +0530
Subject: [PATCH 05/11] [Fix]: production orders waiting raw materials can not
be cancelled
lp bug: https://launchpad.net/bugs/498033 fixed
bzr revid: rha@tinyerp.com-20110107091158-1qrugqztsw5ulktr
---
addons/mrp/mrp.py | 14 ++++++++++----
addons/mrp/mrp_view.xml | 3 ++-
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index a57b76bf2ce..c5ac35ce0df 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -444,7 +444,7 @@ class mrp_production(osv.osv):
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)]),
'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."),
- 'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True,
+ 'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True, ondelete="restrict",
help="This is the internal picking list that brings the finished product to the production plan"),
'move_prod_id': fields.many2one('stock.move', 'Move product', readonly=True),
'move_lines': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products to Consume', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}),
@@ -602,12 +602,18 @@ class mrp_production(osv.osv):
workcenter_line_obj.create(cr, uid, line)
return len(results)
- def action_cancel(self, cr, uid, ids):
+ def action_cancel(self, cr, uid, ids, context=None):
""" Cancels the production order and related stock moves.
@return: True
"""
+ if context is None:
+ context = {}
move_obj = self.pool.get('stock.move')
- for production in self.browse(cr, uid, ids):
+ for production in self.browse(cr, uid, ids, context=context):
+ if production.picking_id.state not in ('draft', 'cancel'):
+ raise osv.except_osv(
+ _('Could not cancel manufacturing order !'),
+ _('You must first cancel related picking attached to this manufacturing order.'))
if production.move_created_ids:
move_obj.action_cancel(cr, uid, [x.id for x in production.move_created_ids])
move_obj.action_cancel(cr, uid, [x.id for x in production.move_lines])
@@ -664,7 +670,7 @@ class mrp_production(osv.osv):
"""
stock_mov_obj = self.pool.get('stock.move')
production = self.browse(cr, uid, production_id, context=context)
-
+
final_product_todo = []
produced_qty = 0
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 000ae6cbcf2..f6b7fb78b88 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -630,7 +630,8 @@
-
+
+
From 43cba5ee71faa5303b76f28059aa89d74a74f885 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Mon, 10 Jan 2011 14:57:13 +0530
Subject: [PATCH 06/11] [FIX]:Custom Reports do not display any values
lp bug: https://launchpad.net/bugs/697554 fixed
bzr revid: ksa@tinyerp.co.in-20110110092713-ni6bjztuw45nmmfh
---
.../base_report_creator.py | 115 +++++++++---------
1 file changed, 60 insertions(+), 55 deletions(-)
diff --git a/addons/base_report_creator/base_report_creator.py b/addons/base_report_creator/base_report_creator.py
index 773458fe3cb..5727646f01c 100644
--- a/addons/base_report_creator/base_report_creator.py
+++ b/addons/base_report_creator/base_report_creator.py
@@ -23,33 +23,16 @@ from osv import fields, osv
from tools.translate import _
from tools import ustr
-class report_creator(osv.osv):
+class report_result(osv.osv):
"""
Report Creator
"""
- _name = "base_report_creator.report"
+ _name = "base_report_creator_report.result"
_description = "Report"
model_set_id = False
#
# Should request only used fields
#
- def export_data(self, cr, uid, ids, fields_to_export, context=None):
- if context is None:
- context = {}
- data_l = self.read(cr, uid, ids, ['sql_query'], context=context)
- final_datas = []
- #start Loop
- for record in data_l:
- datas = []
- for key in fields_to_export:
- value = record.get(key,'')
- if isinstance(value, tuple):
- datas.append(ustr(value[1]))
- else:
- datas.append(ustr(value))
- final_datas += [datas]
- #End Loop
- return {'datas': final_datas}
def fields_get(self, cr, user, fields=None, context=None):
"""
@@ -64,9 +47,9 @@ class report_creator(osv.osv):
data = context and context.get('report_id', False) or False
if (not context) or 'report_id' not in context:
- return super(report_creator, self).fields_get(cr, user, fields, context)
+ return super(report_result, self).fields_get(cr, user, fields, context)
if data:
- report = self.browse(cr, user, data)
+ report = self.pool.get('base_report_creator.report').browse(cr, user, data,context=context)
models = {}
#Start Loop
for model in report.model_ids:
@@ -80,12 +63,8 @@ class report_creator(osv.osv):
i += 1
else:
fields['column_count'] = {'readonly': True, 'type': 'integer', 'string': 'Count', 'size': 64, 'name': 'column_count'}
-
return fields
- #
- # Should Call self.fields_get !
- #
def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
"""
Overrides orm field_view_get.
@@ -98,8 +77,8 @@ class report_creator(osv.osv):
data = context and context.get('report_id', False) or False
if (not context) or 'report_id' not in context:
- return super(report_creator, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
- report = self.browse(cr, user, data)
+ return super(report_result, self).fields_view_get(cr, user, view_id, view_type, context, toolbar=toolbar, submenu=submenu)
+ report = self.pool.get('base_report_creator.report').browse(cr, user, context.get('report_id'), context=context)
models = {}
for model in report.model_ids:
models[model.model] = self.pool.get(model.model).fields_get(cr, user, context=context)
@@ -192,31 +171,24 @@ class report_creator(osv.osv):
"""
if context is None:
context = {}
- data = context.get('report_id', False)
- res = super(report_creator, self).read(cr, user, ids, fields, context, load)
- if (not context) or 'report_id' not in context:
- return res
- wp = ''
- for data in res:
- if not data.get('sql_query'):
- return res
- if self.model_set_id:
- wp = [self._id_get(cr, user, data, context) + (' in (%s)' % (','.join(map(lambda x: "'" + str(x) + "'", ids))))]
- cr.execute(data['sql_query'])
- res = cr.dictfetchall()
- fields_get = self.fields_get(cr, user, None, context)
- for r in res:
- for k in r:
- r[k] = r[k] or False
- field_dict = fields_get.get(k)
- field_type = field_dict and field_dict.get('type', False) or False
- if field_type and field_type == 'many2one':
- if r[k] == False:
- continue
- related_name = self.pool.get(field_dict.get('relation')).name_get(cr, user, [r[k]], context)[0]
+ report_id = context.get('active_id', False)
+ report = self.pool.get('base_report_creator.report').browse(cr, user, context.get('report_id'), context=context)
+ sql_qry = report.sql_query
+ cr.execute(sql_qry)
+ result = cr.dictfetchall()
+ fields_get = self.fields_get(cr, user, None, context)
+ for r in result:
+ for k in r:
+ r[k] = r[k] or False
+ field_dict = fields_get.get(k)
+ field_type = field_dict and field_dict.get('type', False) or False
+ if field_type and field_type == 'many2one':
+ if r[k] == False:
+ continue
+ if r[k]:
+ related_name = self.pool.get(field_dict.get('relation')).name_get(cr, user, [r[k]], context)
r[k] = related_name
-
- return res
+ return result
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
"""
@@ -231,9 +203,9 @@ class report_creator(osv.osv):
context_id = context.get('report_id', False)
if (not context) or 'report_id' not in context:
- return super(report_creator, self).search(cr, user, args, offset, limit, order, context, count)
+ return {}
if context_id:
- report = self.browse(cr, user, context_id)
+ report = self.pool.get('base_report_creator.report').browse(cr, user, context_id, context=context)
i = 0
fields = {}
for f in report.field_ids:
@@ -254,10 +226,42 @@ class report_creator(osv.osv):
ctx = context or {}
ctx['getid'] = True
sql_query = report.sql_query
- cr.execute(sql_query, newargs2)
+ cr.execute(sql_query) # TODO: FILTER
result = cr.fetchall()
return map(lambda x: x[0], result)
+report_result()
+
+
+class report_creator(osv.osv):
+ """
+ Report Creator
+ """
+ _name = "base_report_creator.report"
+ _description = "Report"
+ model_set_id = False
+ #
+ # Should request only used fields
+ #
+ def export_data(self, cr, uid, ids, fields_to_export, context=None):
+ if context is None:
+ context = {}
+ data_l = self.read(cr, uid, ids, ['sql_query'], context=context)
+ final_datas = []
+ #start Loop
+ for record in data_l:
+ datas = []
+ for key in fields_to_export:
+ value = record.get(key,'')
+ if isinstance(value, tuple):
+ datas.append(ustr(value[1]))
+ else:
+ datas.append(ustr(value))
+ final_datas += [datas]
+ #End Loop
+ return {'datas': final_datas}
+
+
def _path_get(self, cr, uid, models, filter_ids=[]):
"""
@param cr: the current row, from the database cursor,
@@ -465,7 +469,7 @@ class report_creator(osv.osv):
'name': rep.name,
'view_type': 'form',
'view_mode': view_mode,
- 'res_model': 'base_report_creator.report',
+ 'res_model': 'base_report_creator_report.result',
'type': 'ir.actions.act_window',
'context': "{'report_id':%d}" % (rep.id,),
'nodestroy': True,
@@ -596,3 +600,4 @@ class report_creator_filter(osv.osv):
}
report_creator_filter()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
From 0bffe9bf6996c8e363a9db7dd80a560797d26678 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Mon, 10 Jan 2011 17:25:25 +0530
Subject: [PATCH 07/11] [FIX]stock:Backorder Cannot be create on Incoming
Shipment
lp bug: https://launchpad.net/bugs/697085 fixed
bzr revid: ron@tinyerp.com-20110110115525-ctcfqhgisj14abvo
---
addons/stock/wizard/stock_partial_picking.py | 172 +++++++++----------
1 file changed, 77 insertions(+), 95 deletions(-)
diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py
index ad75c142a96..45a12208101 100644
--- a/addons/stock/wizard/stock_partial_picking.py
+++ b/addons/stock/wizard/stock_partial_picking.py
@@ -28,54 +28,71 @@ class stock_partial_picking(osv.osv_memory):
_name = "stock.partial.picking"
_description = "Partial Picking"
_columns = {
- 'date': fields.datetime('Date', required=True),
- 'product_moves_out' : fields.one2many('stock.move.memory.out', 'wizard_id', 'Moves'),
- 'product_moves_in' : fields.one2many('stock.move.memory.in', 'wizard_id', 'Moves'),
+ 'date': fields.datetime('Date', required=True),
+ 'product_moves_out' : fields.one2many('stock.move.memory.out', 'wizard_id', 'Moves'),
+ 'product_moves_in' : fields.one2many('stock.move.memory.in', 'wizard_id', 'Moves'),
}
- def __is_in(self,cr, uid, pick_ids):
+ def get_picking_type(self, cr, uid, picking, context=None):
+ picking_type = picking.type
+ for move in picking.move_lines:
+ if picking.type == 'in' and move.product_id.cost_method == 'average':
+ picking_type = 'in'
+ return picking_type
+
+ def default_get(self, cr, uid, fields, context=None):
+ """ To get default values for the object.
+ @param self: The object pointer.
+ @param cr: A database cursor
+ @param uid: ID of the user currently logged in
+ @param fields: List of fields for which we want default values
+ @param context: A standard dictionary
+ @return: A dictionary which of fields with values.
"""
- @return: True if one of the moves has as picking type 'in'
- """
- if not pick_ids:
- return False
+ if context is None:
+ context = {}
+
+ pick_obj = self.pool.get('stock.picking')
+ res = super(stock_partial_picking, self).default_get(cr, uid, fields, context=context)
+ picking_ids = context.get('active_ids', [])
+ if not picking_ids:
+ return res
+
+ result = []
+ for pick in pick_obj.browse(cr, uid, picking_ids, context=context):
+ pick_type = self.get_picking_type(cr, uid, pick, context=context)
+ for m in pick.move_lines:
+ if m.state in ('done', 'cancel'):
+ continue
+ result.append(self.__create_partial_picking_memory(m, pick_type))
+
+ if 'product_moves_in' in fields:
+ res.update({'product_moves_in': result})
+ if 'product_moves_out' in fields:
+ res.update({'product_moves_out': result})
+ if 'date' in fields:
+ res.update({'date': time.strftime('%Y-%m-%d %H:%M:%S')})
+ return res
+
+ def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
+ result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu)
pick_obj = self.pool.get('stock.picking')
- pick_ids = pick_obj.search(cr, uid, [('id','in',pick_ids)])
-
-
- for pick in pick_obj.browse(cr, uid, pick_ids):
- for move in pick.move_lines:
- if pick.type == 'in' and move.product_id.cost_method == 'average':
- return True
- return False
-
- def __get_picking_type(self, cr, uid, pick_ids):
- if self.__is_in(cr, uid, pick_ids):
- return "product_moves_in"
- else:
- return "product_moves_out"
-
- def view_init(self, cr, uid, fields_list, context=None):
- res = super(stock_partial_picking, self).view_init(cr, uid, fields_list, context=context)
- return res
-
- def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False):
- result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu)
-
-
picking_ids = context.get('active_ids', False)
- picking_type = self.__get_picking_type(cr, uid, picking_ids)
+
+ for pick in pick_obj.browse(cr, uid, picking_ids, context=context):
+ picking_type = self.get_picking_type(cr, uid, pick, context=context)
_moves_arch_lst = """
From 54970584f1b8372ffaf5cdddade1c7f7ad6c8c59 Mon Sep 17 00:00:00 2001
From: "ron@tinyerp.com" <>
Date: Tue, 11 Jan 2011 10:11:17 +0530
Subject: [PATCH 09/11] [ADD]purchase:Add Yml file which has product price
Costing Method is Average Price
bzr revid: ron@tinyerp.com-20110111044117-sn2y9gwqskqpqgml
---
addons/purchase/__openerp__.py | 2 +-
.../test/purchase_on_average_price.yml | 107 ++++++++++++++++++
2 files changed, 108 insertions(+), 1 deletion(-)
create mode 100644 addons/purchase/test/purchase_on_average_price.yml
diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py
index 58b049e130e..643ba4fc212 100644
--- a/addons/purchase/__openerp__.py
+++ b/addons/purchase/__openerp__.py
@@ -54,7 +54,7 @@
'report/purchase_report_view.xml',
'board_purchase_view.xml',
],
- 'test': [
+ 'test': ['test/purchase_on_average_price.yml',
'test/purchase_from_order.yml',
'test/purchase_from_manual.yml',
'test/purchase_from_picking.yml',
diff --git a/addons/purchase/test/purchase_on_average_price.yml b/addons/purchase/test/purchase_on_average_price.yml
new file mode 100644
index 00000000000..42e5e369840
--- /dev/null
+++ b/addons/purchase/test/purchase_on_average_price.yml
@@ -0,0 +1,107 @@
+-
+ In order to test Checking of Cost price of product if the product price "Costing Method"
+ is "Average Price" and we change value of product on incoming shipment
+
+-
+ I create product.
+-
+ !record {model: product.product, id: product_product_pen0 }:
+ categ_id: product.product_category_3
+ cost_method: average
+ name: Pen drive
+ procure_method: make_to_stock
+ supply_method: buy
+ type: product
+ standard_price: 1500.0
+ list_price: 1500.0
+ supply_method: buy
+ uom_id: product.product_uom_unit
+ uom_po_id: product.product_uom_unit
+ volume: 0.0
+ warranty: 0.0
+ weight: 0.0
+
+-
+ Update Starting Real Stock And Virtual Stock threw Wizard
+-
+ !record {model: stock.change.product.qty , id: stock_change_product_id }:
+ product_id: product_product_pen0
+ new_quantity: 2.0
+ location_id: stock.stock_location_stock
+-
+ Then, Click on "Update Price" button of this wizard.
+-
+ !python {model: stock.change.product.qty }: |
+ self.change_product_qty(cr, uid, [ref('stock_change_product_id')], {'active_id': ref('product_product_pen0')})
+-
+ I create purchase order for Pen drive.
+-
+ !record {model: purchase.order, id: purchase_order_po11}:
+ company_id: base.main_company
+ date_order: '2010-05-11'
+ invoice_method: order
+ location_id: stock.stock_location_stock
+ order_line:
+ - date_planned: '2010-05-13'
+ name: Pen drive
+ price_unit: 1500.0
+ product_id: 'product_product_pen0'
+ product_qty: 2.0
+ product_uom: product.product_uom_unit
+ state: draft
+ partner_address_id: base.res_partner_address_7
+ partner_id: base.res_partner_4
+ pricelist_id: purchase.list0
+-
+ PO Initially in Draft State .
+-
+ !assert {model: purchase.order, id: purchase_order_po11}:
+ - state == 'draft'
+-
+ PO Going to Draft To Confirm State
+-
+ !workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po11}
+-
+ I check that the Order has transit from draft state to confirm state.
+-
+ !assert {model: purchase.order, id: purchase_order_po11}:
+ - state == 'approved'
+-
+ I receive the order of the supplier the Incoming Shipments menu.
+-
+ !python {model: stock.picking }: |
+ import time
+ procurement_obj = self.pool.get('procurement.order')
+ proc_ids = procurement_obj.browse(cr, uid, [ref('purchase_order_po11')])[0]
+ picking_ids = self.search(cr, uid, [('purchase_id', '=', proc_ids.id),('type','=','in')])
+ pickings = self.browse(cr, uid, picking_ids)
+ for picking in pickings:
+ move = picking.move_lines[0]
+ partial_datas = {
+ 'partner_id': picking.address_id.partner_id.id,
+ 'address_id': picking.address_id.id,
+ 'delivery_date' : time.strftime('%Y-%m-%d')
+ }
+ partial_datas['move%s'%(move.id)]= {
+ 'product_id': move.product_id,
+ 'product_qty': move.product_qty,
+ 'product_uom': move.product_uom.id,
+ 'product_price' : 1000.0,
+ }
+ self.do_partial(cr, uid, [picking.id], partial_datas)
+-
+ I confirm the Reservation.
+-
+ !python {model: stock.move }: |
+ procurement_obj = self.pool.get('procurement.order')
+ picking_obj = self.pool.get('stock.picking')
+ proc_ids = procurement_obj.browse(cr, uid, [ref('purchase_order_po11')])[0]
+ picking_ids = picking_obj.search(cr, uid, [('purchase_id', '=', proc_ids.id),('type','=','in')])
+ move_ids = self.search(cr, uid, [('picking_id', '=', picking_ids)])
+ self.action_done(cr,uid,move_ids)
+-
+ Compare With Avarage Price Has Been Updated that is Correct
+-
+ !assert {model: product.product, id: product_product_pen0 ,string: Updated Avarage Price Has not been Correct}:
+ - standard_price == 1250
+
From d74281c300ac097aa24dd13f97fd1d3f2a755d3b Mon Sep 17 00:00:00 2001
From: Yogesh Sakhreliya
Date: Tue, 11 Jan 2011 14:37:20 +0530
Subject: [PATCH 10/11] FIX] shortcuts remove in view file and create data in
separate file and set noupdate='1'.
bzr revid: ysa@tinyerp.com-20110111090720-d65ynsn07d52fobg
---
addons/crm/__openerp__.py | 9 +++++----
addons/crm/crm_meeting_menu.xml | 6 ------
addons/crm/crm_meeting_shortcut_data.xml | 13 +++++++++++++
addons/product/__openerp__.py | 1 +
addons/product/product_shortcut_data.xml | 13 +++++++++++++
addons/product/product_view.xml | 10 ++--------
6 files changed, 34 insertions(+), 18 deletions(-)
create mode 100644 addons/crm/crm_meeting_shortcut_data.xml
create mode 100644 addons/product/product_shortcut_data.xml
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 74eb1a95b23..af2b53d1c93 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -41,7 +41,7 @@ appropriate staff, and make sure all future correspondence gets to the right
place.
The CRM module has a email gateway for the synchronisation interface
-between mails and OpenERP.
+between mails and OpenERP.
Create dashboard for CRM that includes:
* My Leads (list)
* Leads by Stage (graph)
@@ -95,6 +95,7 @@ Create dashboard for CRM that includes:
'crm_meeting_view.xml',
'crm_meeting_menu.xml',
+ 'crm_meeting_shortcut_data.xml',
'crm_phonecall_view.xml',
'crm_phonecall_menu.xml',
@@ -106,12 +107,12 @@ Create dashboard for CRM that includes:
'report/crm_phonecall_report_view.xml',
'process/crm_configuration_process.xml',
- 'crm_installer_view.xml',
-
+ 'crm_installer_view.xml',
+
'res_partner_view.xml',
'board_crm_view.xml',
'board_crm_statistical_view.xml',
-
+
],
'demo_xml': [
'crm_demo.xml',
diff --git a/addons/crm/crm_meeting_menu.xml b/addons/crm/crm_meeting_menu.xml
index a75528810e0..35ff86cb5b8 100644
--- a/addons/crm/crm_meeting_menu.xml
+++ b/addons/crm/crm_meeting_menu.xml
@@ -92,12 +92,6 @@
action="crm_case_categ_meet" parent="menu_meeting_sale"
sequence="1" />
-
- Meetings
- ir.ui.menu
-
-
-
Meeting Invitations
ir.actions.act_window
diff --git a/addons/crm/crm_meeting_shortcut_data.xml b/addons/crm/crm_meeting_shortcut_data.xml
new file mode 100644
index 00000000000..fcba36f7a61
--- /dev/null
+++ b/addons/crm/crm_meeting_shortcut_data.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Meetings
+ ir.ui.menu
+
+
+
+
+
+
diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py
index 851031e0424..712e17aebc3 100644
--- a/addons/product/__openerp__.py
+++ b/addons/product/__openerp__.py
@@ -53,6 +53,7 @@
'product_data.xml',
'product_report.xml',
'product_view.xml',
+ 'product_shortcut_data.xml',
'pricelist_view.xml',
'partner_view.xml',
'process/product_process.xml'
diff --git a/addons/product/product_shortcut_data.xml b/addons/product/product_shortcut_data.xml
new file mode 100644
index 00000000000..4f48445a197
--- /dev/null
+++ b/addons/product/product_shortcut_data.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ Products
+ ir.ui.menu
+
+
+
+
+
+
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 642ef43caf9..59623a5204e 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -9,7 +9,7 @@
search
-
+
@@ -30,7 +30,7 @@
-
+
@@ -635,12 +635,6 @@
form
-
- Products
- ir.ui.menu
-
-
-
From 9fee3471ca8f72b2a8938f8c9a83234da1f5ae6d Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Tue, 11 Jan 2011 17:23:17 +0530
Subject: [PATCH 11/11] [FIX]:Duplication of product should not duplicate its
BOM if the product is component
lp bug: https://launchpad.net/bugs/701017 fixed
bzr revid: ksa@tinyerp.co.in-20110111115317-bmo3nbip63575s92
---
addons/mrp/mrp.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index a57b76bf2ce..03b04478524 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -342,7 +342,7 @@ class mrp_bom(osv.osv):
if context is None:
context = {}
bom_data = self.read(cr, uid, id, [], context=context)
- default.update({'name': bom_data['name'] + ' ' + _('Copy')})
+ default.update({'name': bom_data['name'] + ' ' + _('Copy'),'bom_id':False})
return super(mrp_bom, self).copy_data(cr, uid, id, default, context=context)
mrp_bom()
@@ -664,7 +664,7 @@ class mrp_production(osv.osv):
"""
stock_mov_obj = self.pool.get('stock.move')
production = self.browse(cr, uid, production_id, context=context)
-
+
final_product_todo = []
produced_qty = 0