diff --git a/addons/association_vertical/aso_data.xml b/addons/association_vertical/aso_data.xml
index b240e19d26a..a09c33029b6 100644
--- a/addons/association_vertical/aso_data.xml
+++ b/addons/association_vertical/aso_data.xml
@@ -2,25 +2,25 @@
diff --git a/addons/association_vertical/aso_vertical_view.xml b/addons/association_vertical/aso_vertical_view.xml
index 76c8535262a..cb810f113d1 100644
--- a/addons/association_vertical/aso_vertical_view.xml
+++ b/addons/association_vertical/aso_vertical_view.xml
@@ -6,22 +6,33 @@
-
-
-
-
-
-
-
-
+
+
diff --git a/addons/association_vertical/crm_fund_demo.xml b/addons/association_vertical/crm_fund_demo.xml
index b8df8c882d0..e5f1a83e6ae 100644
--- a/addons/association_vertical/crm_fund_demo.xml
+++ b/addons/association_vertical/crm_fund_demo.xml
@@ -51,8 +51,9 @@
-
-
+
+
+
Funds
crm.case
@@ -72,7 +73,7 @@
-
+
@@ -100,7 +101,7 @@
-
+
My Funds Waiting Validation
@@ -127,7 +128,7 @@
-
+
My Funds To Be Processed
@@ -154,7 +155,7 @@
-
+
@@ -182,7 +183,7 @@
-
+
All Funds Waiting Validation
@@ -209,7 +210,7 @@
-
+
All Funds To Be Processed
@@ -236,7 +237,7 @@
-
+
diff --git a/addons/auction/auction.py b/addons/auction/auction.py
index d01165954fb..4b8135f3ba8 100644
--- a/addons/auction/auction.py
+++ b/addons/auction/auction.py
@@ -92,7 +92,6 @@ class auction_dates(osv.osv):
_order = "auction1 desc"
def close(self, cr, uid, ids, *args):
- print "GGGGGGGGGGGGGGGggg"
"""
Close an auction date.
@@ -107,13 +106,11 @@ class auction_dates(osv.osv):
ach_uids = {}
cr.execute('select id from auction_lots where auction_id in ('+','.join(map(str,ids))+') and state=%s and obj_price>0', ('draft',))
r=self.pool.get('auction.lots').lots_invoice(cr, uid, [x[0] for x in cr.fetchall()],{},None)
- print "RRRRRRRRRRRRRRRRrrrr",r
cr.execute('select id from auction_lots where auction_id in ('+','.join(map(str,ids))+') and obj_price>0')
ids2 = [x[0] for x in cr.fetchall()]
# for auction in auction_ids:
c=self.pool.get('auction.lots').seller_trans_create(cr, uid, ids2,{})
self.write(cr, uid, ids, {'state':'closed'}) #close the auction
- print "jjjjjjjjjjjjjjjj"
return True
auction_dates()
@@ -443,7 +440,7 @@ class auction_lots(osv.osv):
'ach_login': fields.char('Buyer Username',size=64),
'ach_uid': fields.many2one('res.partner', 'Buyer'),
'ach_emp': fields.boolean('Taken Away'),
- 'is_ok': fields.boolean('Buyer s payment'),
+ 'is_ok': fields.boolean('Buyer\'s payment'),
'ach_inv_id': fields.many2one('account.invoice','Buyer Invoice', readonly=True, states={'draft':[('readonly',False)]}),
'sel_inv_id': fields.many2one('account.invoice','Seller Invoice', readonly=True, states={'draft':[('readonly',False)]}),
'vnd_lim': fields.float('Seller limit'),
@@ -644,6 +641,8 @@ class auction_lots(osv.osv):
res = self.pool.get('res.partner').address_get(cr, uid, [partner_ref], ['contact', 'invoice'])
contact_addr_id = res['contact']
invoice_addr_id = res['invoice']
+ if not invoice_addr_id:
+ raise orm.except_orm('No Invoice Address', 'The Buyer "%s" has no Invoice Address.' % (contact_addr_id,))
inv = {
'name': 'Auction proforma:' +lot.name,
'journal_id': lot.auction_id.journal_id.id,
@@ -756,9 +755,7 @@ class auction_lots(osv.osv):
dt = time.strftime('%Y-%m-%d')
inv_ref=self.pool.get('account.invoice')
invoices={}
- print "KKKKKKKKKKKKKKKKK"
for lot in self.browse(cr, uid, ids,context):
- print "LLLLLLLLLLLLLLLL"
# partner_ref = lot.ach_uid.id
if not lot.auction_id.id:
continue
@@ -768,6 +765,9 @@ class auction_lots(osv.osv):
if (lot.auction_id.id,lot.ach_uid.id) in invoices:
inv_id = invoices[(lot.auction_id.id,lot.ach_uid.id)]
else:
+ add = partner_r.read(cr, uid, [lot.ach_uid.id], ['address'])[0]['address']
+ if not len(add):
+ raise orm.except_orm('Missed Address !', 'The Buyer has no Invoice Address.')
price = lot.obj_price or 0.0
lot_name =lot.obj_num
inv={
@@ -776,13 +776,13 @@ class auction_lots(osv.osv):
'journal_id': lot.auction_id.journal_id.id,
'partner_id': lot.ach_uid.id,
'type': 'out_invoice',
+
}
if invoice_number:
inv['number'] = invoice_number
inv.update(inv_ref.onchange_partner_id(cr,uid, [], 'out_invoice', lot.ach_uid.id)['value'])
#inv['account_id'] = inv['account_id'] and inv['account_id'][0]
inv_id = inv_ref.create(cr, uid, inv, context)
- print "IN>>>>>>>>>>>>ID",inv_id
invoices[(lot.auction_id.id,lot.ach_uid.id)] = inv_id
self.write(cr,uid,[lot.id],{'ach_inv_id':inv_id,'state':'sold'})
#calcul des taxes
@@ -848,7 +848,10 @@ class auction_bid(osv.osv):
if not partner_id:
return {'value': {'contact_tel':False}}
contact = self.pool.get('res.partner').browse(cr, uid, partner_id)
- v_contact=contact.address[0] and contact.address[0].phone or False
+ if len(contact.address):
+ v_contact=contact.address[0] and contact.address[0].phone
+ else:
+ v_contact = False
return {'value': {'contact_tel': v_contact}}
auction_bid()
@@ -876,7 +879,6 @@ class auction_bid_lines(osv.osv):
# lots=self.browse(cr,uid,ids)
# for lot in lots:
# res[lot.id] = lot.lot_id.auction_id.name
-# print lot.lot_id.auction_id.name
# return res
_columns = {
'name': fields.char('Bid date',size=64),
@@ -1026,6 +1028,7 @@ class report_seller_auction2(osv.osv):
_name = "report.seller.auction2"
_description = "Auction Reporting on seller view2"
_auto = False
+ _rec_name = 'date'
_columns = {
'seller': fields.many2one('res.partner','Seller',readonly=True, select=1),
'auction': fields.many2one('auction.dates', 'Auction date',readonly=True, select=1),
diff --git a/addons/auction/auction_view.xml b/addons/auction/auction_view.xml
index ea8d8cbc4e0..28b6b2422b6 100644
--- a/addons/auction/auction_view.xml
+++ b/addons/auction/auction_view.xml
@@ -1,8 +1,8 @@
-
-
+
+
=======================================================
Auction Management/Configuration/artist
@@ -39,7 +39,7 @@
form
-
+
=======================================================
Auction Management/Configuration/objectcategories
@@ -74,7 +74,7 @@
form
-
+
=======================================================
Auction Management/Auction Dates/New Auction Dates
=======================================================
@@ -126,7 +126,9 @@ Auction Management/Auction Dates/New Auction Dates
[('state','=','draft')]
-
+
+
+
=======================================================
Auction Management/Auction Dates/Old Auction Dates
=======================================================
@@ -137,15 +139,14 @@ Auction Management/Auction Dates/New Auction Dates
[('state','=','closed')]
-
+
auction.dates
form
-
-
+
@@ -288,10 +289,9 @@ Auction Management/Auction Dates/Reporting
+
-
-
@@ -359,16 +359,22 @@ Auction Management/Auction Dates/Reporting
+
+ auction.lots
+ form
+ tree,form
+
auction.lots
form
[('state','=','sold')]
-
+
+
+
+
+
auction.lots
@@ -376,7 +382,7 @@ Auction Management/Auction Dates/Reporting
tree,form
[('state','<>','sold')]
-
+
auction.lots
@@ -384,15 +390,7 @@ Auction Management/Auction Dates/Reporting
tree,form
[('auction_id','=', False),('state','=','draft')]
-
-
-
-
- auction.lots
- form
- tree,form
-
-
+
@@ -404,7 +402,8 @@ Auction Management/Auction Dates/Reporting
[('state','=','unsold')]
@@ -481,7 +480,7 @@ Auction Management/Auction Dates/Reporting
form
tree,form
-
+
Auction.deposit.tree
@@ -599,8 +598,9 @@ Auction Management/Auction Dates/Reporting
form
-
-
+
+
+
=======================================================
"Auction Management/Buyers/Bids
@@ -640,8 +640,6 @@ Auction Management/Auction Dates/Reporting
auction.bid
form
-
-
=======================================================
@@ -696,7 +694,9 @@ Auction Management/Auction Dates/Reporting
auction.bid
tree,form
-
+
+
+
@@ -705,7 +705,7 @@ Auction Management/Auction Dates/Reporting
tree,form
-
+
@@ -743,7 +743,8 @@ Auction Management/Auction Dates/Reporting
-
+
+
@@ -753,7 +754,8 @@ Auction Management/Auction Dates/Reporting
tree
-
+
+
@@ -799,7 +801,9 @@ Auction Management/Auction Dates/Reporting
tree
[('date','ilike',time.strftime('%Y-%m'))]
-
+
+
+
@@ -808,7 +812,7 @@ Auction Management/Auction Dates/Reporting
form
tree
-
+
@@ -865,14 +869,15 @@ Auction Management/Auction Dates/Reporting
tree,graph
[('date','ilike',time.strftime('%Y-%m'))]
-
Seller's auction
report.seller.auction
form
tree,graph
-
+
+
+
Seller's auction
report.seller.auction2
@@ -926,7 +931,7 @@ Auction Management/Auction Dates/Reporting
tree,graph
[('date','ilike',time.strftime('%Y-%m'))]
-
+
Buyer's auction
@@ -964,7 +969,7 @@ Auction Management/Auction Dates/Reporting
tree
[('date','ilike',time.strftime('%Y-%m'))]
-
+
Buyer's auction
report.buyer.auction2
@@ -1003,7 +1008,6 @@ Auction Management/Auction Dates/Reporting
tree
[('date','ilike',time.strftime('%Y-%m'))]
-
Buyer's auction
@@ -1011,17 +1015,19 @@ Auction Management/Auction Dates/Reporting
form
tree
-
+
+
+
Buyer's auction for all months
report.buyer.auction2
form
tree
-
-
-
-
+
+
+
+
@@ -1126,13 +1132,16 @@ estimation.adj.category
graph,tree
[('date','like',time.strftime('%Y-%m')),('user_id','=',uid)]
-
-
+
+
+
+
+
-=
-
-
report attendance
report.attendance
@@ -1212,7 +1219,7 @@ sign in sign out report by user
[('employee_id','=',uid)]
-
+
@@ -1222,7 +1229,7 @@ sign in sign out report by user
[('name','ilike',time.strftime('%Y-%m-%d'))]
-
+
==============================
My Latest Objects
@@ -1233,7 +1240,7 @@ My Latest Objects
tree,form
[('create_uid','=',uid)]
-
+
auction.lots
form
@@ -1252,7 +1259,7 @@ My Latest Deposit
tree,form
[('create_uid','=',uid)]
-
+
auction.deposit
@@ -1260,7 +1267,7 @@ My Latest Deposit
tree,form
-
+
=============================
Objects per Day
==============================
@@ -1319,13 +1326,15 @@ Objects per Day
[('month','=',time.strftime('%Y-%m-01'))]
+ id="menu_report_auction_object_date_tree"
+ parent="auction_report_manager_menu"/>
+ id="menu_report_auction_object_date_tree1_my"
+ parent="auction_report_employees_menu"/>
@@ -1376,9 +1385,10 @@ Objects per Day
tree
[('state','=', 'draft')]
-
+ action="action_report_object_by_auction" sequence="11"/>
form
graph,tree
-
+
-
Depositer's statistics
@@ -1446,8 +1455,8 @@ Auction adjudication
form
tree
-
-
+
+
=============================
Object encoded
==============================
@@ -1521,8 +1530,6 @@ Object encoded
[('user_id','=',uid),('date','ilike',time.strftime('%Y-%m'))]
-
-
report.object.encoded.tree
@@ -1567,7 +1574,6 @@ Object encoded
[('date','ilike',time.strftime('%Y-%m'))]
-
report.unclassified.objects
report.unclassified.objects
diff --git a/addons/auction/auction_wizard.xml b/addons/auction/auction_wizard.xml
index daefea82d88..d98d8ae60ac 100644
--- a/addons/auction/auction_wizard.xml
+++ b/addons/auction/auction_wizard.xml
@@ -41,10 +41,17 @@
name="auction.taken"
multi="1"
id="wizard_emporte"/>
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_configuration/crm_jobs_demo.xml b/addons/crm_configuration/crm_jobs_demo.xml
index af9818ed571..bc5040472fd 100644
--- a/addons/crm_configuration/crm_jobs_demo.xml
+++ b/addons/crm_configuration/crm_jobs_demo.xml
@@ -232,12 +232,12 @@
-
+
-
+
All Jobs Requests
crm.case
tree,calendar,form
@@ -399,6 +399,6 @@
-
+
diff --git a/addons/crm_configuration/crm_meeting_demo.xml b/addons/crm_configuration/crm_meeting_demo.xml
index 7ff8978c160..d6dc11a4465 100644
--- a/addons/crm_configuration/crm_meeting_demo.xml
+++ b/addons/crm_configuration/crm_meeting_demo.xml
@@ -86,24 +86,24 @@
-->
crm.case
- calendar,tree,form
-
+ tree,form,calendar
+
-
+
calendar
-
+
tree
-
+
form
@@ -114,24 +114,24 @@
Draft Meetings
crm.case
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
@@ -142,24 +142,24 @@
Confirmed Meetings
crm.case
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
@@ -172,23 +172,23 @@
-->
crm.case
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
@@ -198,24 +198,24 @@
Draft Meetings
crm.case
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
@@ -225,24 +225,24 @@
Confirmed Meetings
crm.case
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
@@ -253,24 +253,24 @@
Next Deadlines
crm.case
form
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
diff --git a/addons/crm_configuration/crm_opportunity_demo.xml b/addons/crm_configuration/crm_opportunity_demo.xml
index 2adb0e96ab2..b2c011b3bf1 100644
--- a/addons/crm_configuration/crm_opportunity_demo.xml
+++ b/addons/crm_configuration/crm_opportunity_demo.xml
@@ -87,24 +87,24 @@
All Opportunities
crm.case
- calendar,tree,form
+ tree,form,calendar
-
+
calendar
-
+
tree
-
+
form
@@ -193,18 +193,18 @@
My Opportunities
crm.case
- calendar,tree,form
+ tree,calendar,form
-
+
calendar
-
+
tree
diff --git a/addons/event/__terp__.py b/addons/event/__terp__.py
index edccafc68ec..9fd8dec7f09 100644
--- a/addons/event/__terp__.py
+++ b/addons/event/__terp__.py
@@ -19,7 +19,7 @@
Events \ Reporting
""",
"depends" : [
- "project","crm","base_contact",
+ "project","crm","base_contact","account_budget",
],
"demo_xml" : ["event_demo.xml"],
"init_xml" : ["event_data.xml"],
diff --git a/addons/hr_holidays/hr.py b/addons/hr_holidays/hr.py
index 5e15107209e..6475084b1fc 100644
--- a/addons/hr_holidays/hr.py
+++ b/addons/hr_holidays/hr.py
@@ -54,9 +54,12 @@ class hr_holidays_status(osv.osv):
'name' : fields.char('Holiday Status', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Section'),
'color_name' : fields.selection([('red', 'Red'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color of the status', required=True),
+ 'limit' : fields.boolean('Allow to override Limit'),
+ 'active' : fields.boolean('Active')
}
_defaults = {
'color_name': lambda *args: 'red',
+ 'active' : lambda *a: True,
}
hr_holidays_status()
@@ -64,6 +67,20 @@ class hr_holidays(osv.osv):
_name = "hr.holidays"
# _inherit = 'hr.holidays'
_description = "Holidays"
+
+ def _get_days(self,cr, uid,ids, name, *args):
+ res = {}
+ for val in self.browse(cr, uid, ids):
+ date_from = val.date_from
+ date_to = val.date_to
+ if date_from:
+ if date_to:
+ from_dt = time.mktime(time.strptime(date_from,'%Y-%m-%d %H:%M:%S'))
+ to_dt = time.mktime(time.strptime(date_to,'%Y-%m-%d %H:%M:%S'))
+ diff_day = (to_dt-from_dt)/(3600*24)
+ res[val.id] = round(diff_day)+1
+ return res
+
_columns = {
'name' : fields.char('Description', required=True, readonly=True, size=64, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'draft'), ('confirm', 'Confirmed'), ('refuse', 'Refused'), ('validate', 'Validate'), ('cancel', 'Cancel')], 'Status', readonly=True),
@@ -74,7 +91,7 @@ class hr_holidays(osv.osv):
'user_id':fields.many2one('res.users', 'Employee_id', states={'draft':[('readonly',False)]}, select=True, readonly=True),
'manager_id' : fields.many2one('hr.employee', 'Holiday manager', invisible=False, readonly=True),
'notes' : fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
- 'number_of_days': fields.float('Number of Days in this Holiday Request',required=True, states={'draft':[('readonly',False)]}, readonly=True),
+ 'number_of_days': fields.function(_get_days, method=True,store=True, type='float', string='Number of Days in this Holiday Request'),
'case_id':fields.many2one('crm.case', 'Case'),
}
_defaults = {
@@ -152,8 +169,9 @@ class hr_holidays(osv.osv):
if holiday_id:
obj_holidays_per_user=self.pool.get('hr.holidays.per.user').browse(cr, uid,holiday_id[0])
leaves_rest=obj_holidays_per_user.max_leaves - obj_holidays_per_user.leaves_taken
- if leaves_rest < leave_asked:
- raise osv.except_osv('Attention!','You Cannot Validate leaves while available leaves are less than asked leaves.')
+ if not obj_holidays_per_user.holiday_status.limit:
+ if leaves_rest < leave_asked:
+ raise osv.except_osv('Attention!','You Cannot Validate leaves while available leaves are less than asked leaves.')
self.pool.get('hr.holidays.per.user').write(cr,uid,obj_holidays_per_user.id,{'leaves_taken':obj_holidays_per_user.leaves_taken + leave_asked})
if record.holiday_status.section_id:
vals={}
@@ -195,9 +213,12 @@ class hr_holidays_per_user(osv.osv):
'holiday_status' : fields.many2one("hr.holidays.status", "Holiday's Status", required=True),
'max_leaves' : fields.float('Maximum Leaves Allowed',required=True),
'leaves_taken' : fields.float('Leaves Already Taken',readonly=True),
+ 'active' : fields.boolean('Active'),
'notes' : fields.text('Notes'),
}
-
+ _defaults = {
+ 'active' : lambda *a: True,
+ }
def create(self, cr, uid, vals, *args, **kwargs):
if vals['employee_id']:
diff --git a/addons/hr_holidays/hr_view.xml b/addons/hr_holidays/hr_view.xml
index 9825337d32c..275aa50cc11 100644
--- a/addons/hr_holidays/hr_view.xml
+++ b/addons/hr_holidays/hr_view.xml
@@ -74,6 +74,8 @@
+
+
@@ -87,6 +89,8 @@
+
+
@@ -112,6 +116,7 @@
+
@@ -127,6 +132,7 @@
+
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index ce971f498f8..92d2e217a85 100644
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -1106,9 +1106,8 @@ class StockPicking(osv.osv):
# Explode picking by replacing phantom BoMs
#
def action_explode(self, cr, uid, picks, *args):
- for pick in picks:
- for move in pick.move_lines:
- self.pool.get('stock.move')._action_explode(cr, uid, move)
+ for move in picks:
+ self.pool.get('stock.move')._action_explode(cr, uid, move)
return picks
StockPicking()
diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py
index 8b9f65451e3..430d8461068 100644
--- a/addons/purchase/stock.py
+++ b/addons/purchase/stock.py
@@ -95,7 +95,7 @@ class stock_picking(osv.osv):
def _invoice_hook(self, cursor, user, picking, invoice_id):
purchase_obj = self.pool.get('purchase.order')
if picking.purchase_id:
- purchase_obj.write(cursor, user, [picking.purchase_id.id], {
+ purchase_obj.write(cursor, user, [picking.purchase_id.id], {'invoiced':True,
'invoice_id': invoice_id,
})
return super(stock_picking, self)._invoice_hook(cursor, user,
diff --git a/addons/report_stock/report_stock.py b/addons/report_stock/report_stock.py
index 8a690fb5179..0ad2f980ec2 100644
--- a/addons/report_stock/report_stock.py
+++ b/addons/report_stock/report_stock.py
@@ -77,5 +77,36 @@ class report_stock_prodlots(osv.osv):
)""")
report_stock_prodlots()
+
+class report_inventory_latest(osv.osv):
+ _name = "report.inventory.latest"
+ _description = "Latest inventories by product."
+ _auto = False
+ _columns = {
+ 'name': fields.datetime('Latest Date',readonly=True),
+ 'product': fields.many2one('product.product', 'Product', readonly=True, select=True),
+ 'inventory': fields.many2one('stock.inventory', 'Inventory Name', readonly=True, select=True),
+ 'qty': fields.float('Quantity', readonly=True, select=True),
+ 'uom' : fields.many2one('product.uom', 'UoM', readonly=True),
+# 'date' : fields.datetime('Latest Date',readonly=True),
+ }
+ _order = 'name desc'
+ def init(self, cr):
+ cr.execute("""
+ create or replace view report_inventory_latest as (
+ select max(l.id) as id,
+ l.product_id as product,
+ l.product_qty as qty,
+ l.product_uom as uom ,
+ min(l.inventory_id) as inventory,
+ i.date as name
+ from stock_inventory_line l
+ join stock_inventory i on (l.inventory_id=i.id)
+ group by l.product_uom,l.product_qty,l.product_id,i.date
+
+ )""")
+report_inventory_latest()
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/report_stock/report_stock_view.xml b/addons/report_stock/report_stock_view.xml
index 2ae68273e5b..7f1327f36b1 100644
--- a/addons/report_stock/report_stock_view.xml
+++ b/addons/report_stock/report_stock_view.xml
@@ -24,7 +24,9 @@
form,tree
-
+
+
+
@@ -32,5 +34,31 @@
+
+ report.inventory.latest.view
+ report.inventory.latest
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+ Latest Inventories by product
+ ir.actions.act_window
+ report.inventory.latest
+ form
+ tree
+ [('name','>=',time.strftime('%Y-%m-01'))]
+
+
+
+
diff --git a/addons/sale/stock.py b/addons/sale/stock.py
index 21d15c65c90..002caba90d5 100644
--- a/addons/sale/stock.py
+++ b/addons/sale/stock.py
@@ -94,7 +94,7 @@ class stock_picking(osv.osv):
def _invoice_line_hook(self, cursor, user, move_line, invoice_line_id):
sale_line_obj = self.pool.get('sale.order.line')
if move_line.sale_line_id:
- sale_line_obj.write(cursor, user, [move_line.sale_line_id.id], {
+ sale_line_obj.write(cursor, user, [move_line.sale_line_id.id], {'invoiced':True,
'invoice_lines': [(6, 0, [invoice_line_id])],
})
return super(stock_picking, self)._invoice_line_hook(cursor, user,
@@ -114,4 +114,3 @@ stock_picking()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/sale/stock_view.xml b/addons/sale/stock_view.xml
index db273c38b60..f6cc1f1c03f 100644
--- a/addons/sale/stock_view.xml
+++ b/addons/sale/stock_view.xml
@@ -15,3 +15,4 @@
+
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 51947b34bee..e90b59b17de 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -945,11 +945,11 @@ class stock_move(osv.osv):
return True
def action_done(self, cr, uid, ids, context=None):
+ track_flag=False
for move in self.browse(cr, uid, ids):
if move.move_dest_id.id and (move.state != 'done'):
mid = move.move_dest_id.id
- if move.move_dest_id.id:
- cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%d,%d)', (move.id, move.move_dest_id.id))
+ cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%d,%d)', (move.id, move.move_dest_id.id))
if move.move_dest_id.state in ('waiting','confirmed'):
self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'})
if move.move_dest_id.picking_id:
@@ -1037,6 +1037,11 @@ class stock_move(osv.osv):
'line_id': lines,
'ref': ref,
})
+
+
+ if (move.product_id.tracking and not move.prodlot_id):
+ raise osv.except_osv('Warning ! ','You should put a production lot for : '+move.product_id.name)
+
self.write(cr, uid, ids, {'state':'done'})
wf_service = netsvc.LocalService("workflow")
@@ -1202,4 +1207,3 @@ class stock_picking_move_wizard(osv.osv_memory):
stock_picking_move_wizard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 85f296647d6..7992f92d62b 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1253,3 +1253,4 @@
+