diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index b2e318b7074..e4886602080 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -1349,7 +1349,7 @@
ir.actions.act_window
account.config.fiscalyear
form
- tree
+ form
new
@@ -1357,8 +1357,8 @@
- Define fiscal years
- Define fiscal years
+ Define Fiscal Years
+ Define Fiscal Years
open
@@ -1525,13 +1525,13 @@
- Account Tax Templates
+ Tax Templates
account.tax.template
form
tree,form
-
+
@@ -1565,12 +1565,12 @@
- Account Tax Code Templates
+ Tax Code Templates
account.tax.code.template
form
tree,form
-
+
diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml
index ad5a6284292..d580ff02285 100644
--- a/addons/account/partner_view.xml
+++ b/addons/account/partner_view.xml
@@ -4,7 +4,7 @@
-
+
res.partner.property.form.inherit
res.partner
@@ -34,7 +34,7 @@
-
+
'''
back_fields={
@@ -146,7 +146,7 @@ class wizard_report(wizard.interface):
# data['form']['periods']=p_ids
data['form']['compare_pattern']='none'
data['form']['account_choice']='moves'
- data['form']['select_periods']='actual'
+ data['form']['period_manner']='actual'
return data['form']
diff --git a/addons/account_payment/account_move_line.py b/addons/account_payment/account_move_line.py
index 884a8408956..23a0afc6173 100644
--- a/addons/account_payment/account_move_line.py
+++ b/addons/account_payment/account_move_line.py
@@ -104,11 +104,13 @@ class account_move_line(osv.osv):
line2bank[line.id] = line.invoice.partner_bank.id
elif line.partner_id:
if not line.partner_id.bank_ids:
- raise osv.except_osv(_('Error !'), _('Partner '+ line.partner_id.name+ ' has no bank account defined'))
- for bank in line.partner_id.bank_ids:
- if bank.state in bank_type:
- line2bank[line.id] = bank.id
- break
+ #raise osv.except_osv(_('Error !'), _('Partner '+ line.partner_id.name+ ' has no bank account defined'))
+ line2bank[line.id] = False
+ else:
+ for bank in line.partner_id.bank_ids:
+ if bank.state in bank_type:
+ line2bank[line.id] = bank.id
+ break
if line.id not in line2bank and line.partner_id.bank_ids:
line2bank[line.id] = line.partner_id.bank_ids[0].id
else:
diff --git a/addons/account_payment/payment_view.xml b/addons/account_payment/payment_view.xml
index ef6773c480a..102b4eccd10 100644
--- a/addons/account_payment/payment_view.xml
+++ b/addons/account_payment/payment_view.xml
@@ -97,7 +97,7 @@
-
+
diff --git a/addons/account_payment/wizard/wizard_payment_order.py b/addons/account_payment/wizard/wizard_payment_order.py
index 76e26f7ea27..be87f0488a7 100644
--- a/addons/account_payment/wizard/wizard_payment_order.py
+++ b/addons/account_payment/wizard/wizard_payment_order.py
@@ -75,7 +75,7 @@ def search_entries(self, cr, uid, data, context):
''' % (','.join([str(x) for x in line_ids]), ctx)
- return {'entries': line_ids}
+ return {}
def create_payment(self, cr, uid, data, context):
line_ids= data['form']['entries'][0][2]
@@ -88,7 +88,7 @@ def create_payment(self, cr, uid, data, context):
payment = order_obj.browse(cr, uid, data['id'],
context=context)
t = payment.mode and payment.mode.type.id or None
- line2bank= pool.get('account.move.line').line2bank(cr, uid,
+ line2bank = pool.get('account.move.line').line2bank(cr, uid,
line_ids, t, context)
## Finally populate the current payment with new lines:
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 b2e7c7fde74..275aa50cc11 100644
--- a/addons/hr_holidays/hr_view.xml
+++ b/addons/hr_holidays/hr_view.xml
@@ -1,95 +1,99 @@
-
+
-
-
- hr.holidays.form.inherit
- hr.holidays
- form
-
-
+
+
+ hr.holidays.form.inherit
+ hr.holidays
+ form
+
+
-
-
+
+
-
- hr.holidays.tree
- hr.holidays
-
- tree
-
+
+ hr.holidays.tree
+ hr.holidays
+
+ tree
+
-
+
-
-
+
+
-
- hr.holidays.tree
- hr.holidays
-
- tree
-
-
-
-
-
-
-
+
+ hr.holidays.tree
+ hr.holidays
+
+ tree
+
+
+
+
+
+
+
-
-
- hr.holidays.status.form
- hr.holidays.status
-
- form
-
+
+
+ hr.holidays.status.form
+ hr.holidays.status
+
+ form
+
-
-
-
- hr.holidays.status.tree
- hr.holidays.status
-
- tree
-
+
+
+
+ hr.holidays.status.tree
+ hr.holidays.status
+
+ tree
+
-
-
+
+
+
+
-
-
+
+
Holiday Status
ir.actions.act_window
@@ -99,153 +103,155 @@
-
-
- hr.holidays.per.user.form
- hr.holidays.per.user
- form
-
-
-
-
-
- hr.holidays.per.user.tree
- hr.holidays.per.user
- tree
-
-
-
-
-
-
-
-
-
+
+
+ hr.holidays.per.user.form
+ hr.holidays.per.user
+ form
+
+
+
+
+
+ hr.holidays.per.user.tree
+ hr.holidays.per.user
+ tree
+
+
+
+
+
+
+
+
+
+
-
- hr.holidays.per.user.graph
- hr.holidays.per.user
- graph
-
-
-
-
-
-
-
-
+
+ hr.holidays.per.user.graph
+ hr.holidays.per.user
+ graph
+
+
+
+
+
+
+
+
-
-
- hr.holidays
- form
-
-
-
+
+
+ hr.holidays
+ form
+
+
+
-
- ir.actions.act_window
- hr.holidays
- form
- tree,form
-
-
+
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+
+
-
- My Holidays Request
- ir.actions.act_window
- hr.holidays
- form
- tree,form
- [('user_id','=',uid)]
-
-
+
+ My Holidays Request
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+ [('user_id','=',uid)]
+
+
-
- My Holidays Request Draft
- ir.actions.act_window
- hr.holidays
- form
- tree,form
- [('user_id','=',uid), ('state','=','draft')]
-
-
+
+ My Holidays Request Draft
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+ [('user_id','=',uid), ('state','=','draft')]
+
+
-
- My Holidays Request Waiting confirmation
- ir.actions.act_window
- hr.holidays
- form
- tree,form
- [('user_id','=',uid), ('state','=','confirm')]
-
-
+
+ My Holidays Request Waiting confirmation
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+ [('user_id','=',uid), ('state','=','confirm')]
+
+
-
- My Holidays Request Validated
- ir.actions.act_window
- hr.holidays
- form
- tree,form
- [('user_id','=',uid), ('state','=','validate')]
-
-
+
+ My Holidays Request Validated
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+ [('user_id','=',uid), ('state','=','validate')]
+
+
-
- My Holidays Request Refused
- ir.actions.act_window
- hr.holidays
- form
- tree,form
- [('user_id','=',uid), ('state','=','refuse')]
-
-
+
+ My Holidays Request Refused
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+ [('user_id','=',uid), ('state','=','refuse')]
+
+
-
- Requests Awaiting for Validation
- ir.actions.act_window
- hr.holidays
- form
- tree,form
- [('state','=','confirm')]
-
-
+
+ Requests Awaiting for Validation
+ ir.actions.act_window
+ hr.holidays
+ form
+ tree,form
+ [('state','=','confirm')]
+
+
-
- Holidays Per Employee
- ir.actions.act_window
- hr.holidays.per.user
- form
- tree,form,graph
-
-
+
+ Holidays Per Employee
+ ir.actions.act_window
+ hr.holidays.per.user
+ form
+ tree,form,graph
+
+
-
- My Available Holidays
- ir.actions.act_window
- hr.holidays.per.user
- form
- tree
- [('user_id','=',uid)]
-
-
+
+ My Available Holidays
+ ir.actions.act_window
+ hr.holidays.per.user
+ form
+ tree
+ [('user_id','=',uid)]
+
+
-
-
+
+
-
+
diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py
index a21a920439d..53d380e20e7 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/process/__terp__.py b/addons/process/__terp__.py
index ea94462fe6a..96bcdb30723 100644
--- a/addons/process/__terp__.py
+++ b/addons/process/__terp__.py
@@ -10,7 +10,7 @@ This module allows you to manage your process for the end-users.
""",
"depends" : ["base", "sale"],
"init_xml" : [],
- "demo_xml" : ['process_data.xml'],
+ "demo_xml" : [],
"update_xml" : [
"security/ir.model.access.csv",
'process_view.xml',
diff --git a/addons/process/example/sale_order.pdf b/addons/process/example/sale_order.pdf
deleted file mode 100644
index c7ce2b99bb4..00000000000
Binary files a/addons/process/example/sale_order.pdf and /dev/null differ
diff --git a/addons/process/process.py b/addons/process/process.py
index cff0a1fb22d..86f96f7c19c 100644
--- a/addons/process/process.py
+++ b/addons/process/process.py
@@ -45,11 +45,11 @@ class process_process(osv.osv):
}
def graph_get(self, cr, uid, id, res_model, res_id, scale, context):
-
- current_object = res_model
+
pool = pooler.get_pool(cr.dbname)
process = pool.get('process.process').browse(cr, uid, [id])[0]
+ current_object = pool.get(res_model).browse(cr, uid, [res_id])[0]
nodes = {}
start = []
@@ -59,20 +59,35 @@ class process_process(osv.osv):
data = {}
data['name'] = node.name
- data['menu'] = node.menu_id.name
- data['model'] = node.model_id.model
+ data['menu'] = (node.menu_id or None) and node.menu_id.name
+ data['model'] = (node.model_id or None) and node.model_id.model
+ data['kind'] = node.kind
+ data['active'] = 0
+
+ if node.kind == "state" and node.model_id and node.model_id.model == res_model:
+ states = node.model_states
+ states = (states or []) and states.split(',')
+ data['active'] = (states and current_object.state in states) or not states
+
+ elif node.kind == "router":
+ #TODO:
+ pass
+
+ elif node.kind == "subflow":
+ #TODO: subflow
+ pass
nodes[node.id] = data
if node.flow_start:
start.append(node.id)
- for tr in node.transition_out:
+ for tr in node.transition_ids:
data = {}
data['name'] = tr.name
- data['source'] = tr.node_from_id.id
- data['target'] = tr.node_to_id.id
+ data['source'] = tr.source_node_id.id
+ data['target'] = tr.target_node_id.id
data['buttons'] = buttons = []
for b in tr.action_ids:
@@ -81,11 +96,11 @@ class process_process(osv.osv):
buttons.append(button)
data['roles'] = roles = []
- for r in tr.transition_ids:
+ for r in tr.role_ids:
role = {}
- role['name'] = r.role_id.name
+ role['name'] = r.name
roles.append(role)
-
+
transitions[tr.id] = data
g = tools.graph(nodes.keys(), map(lambda x: (x['source'], x['target']), transitions.values()))
@@ -130,8 +145,7 @@ class process_node(osv.osv):
'model_id': fields.many2one('ir.model', 'Object', ondelete='set null'),
'model_states': fields.char('States Expression', size=128),
'flow_start': fields.boolean('Starting Flow'),
- 'transition_in': fields.one2many('process.transition', 'node_to_id', 'Starting Transitions'),
- 'transition_out': fields.one2many('process.transition', 'node_from_id', 'Ending Transitions'),
+ 'transition_ids': fields.one2many('process.transition', 'target_node_id', 'Transitions'),
}
_defaults = {
'kind': lambda *args: 'state',
@@ -145,11 +159,11 @@ class process_transition(osv.osv):
_description ='Process Transitions'
_columns = {
'name': fields.char('Name', size=32, required=True),
- 'node_from_id': fields.many2one('process.node', 'Origin Node', required=True, ondelete='cascade'),
- 'node_to_id': fields.many2one('process.node', 'Destination Node', required=True, ondelete='cascade'),
- 'transition_ids': fields.many2many('workflow.transition', 'process_transition_ids', 'trans1_id', 'trans2_id', 'Workflow Transitions'),
+ 'source_node_id': fields.many2one('process.node', 'Source Node', required=True, ondelete='cascade'),
+ 'target_node_id': fields.many2one('process.node', 'Target Node', required=True, ondelete='cascade'),
+ 'action_ids': fields.one2many('process.transition.action', 'transition_id', 'Buttons'),
+ 'role_ids': fields.many2many('res.roles', 'process_transition_roles_rel', 'process_transition_id', 'role_id', 'Roles Required'),
'note': fields.text('Description'),
- 'action_ids': fields.one2many('process.transition.action', 'transition_id', 'Buttons')
}
_defaults = {
}
@@ -160,7 +174,10 @@ class process_transition_action(osv.osv):
_description ='Process Transitions Actions'
_columns = {
'name': fields.char('Name', size=32, required=True),
- 'state': fields.selection([('dummy','Dummy'),('method','Object Method'),('workflow','Workflow Trigger'),('action','Action')], 'Type', required=True),
+ 'state': fields.selection([('dummy','Dummy'),
+ ('method','Object Method'),
+ ('workflow','Workflow Trigger'),
+ ('action','Action')], 'Type', required=True),
'action': fields.char('Action ID', size=64, states={
'dummy':[('readonly',1)],
'method':[('required',1)],
diff --git a/addons/process/process_report.xml b/addons/process/process_report.xml
deleted file mode 100644
index 51a231c2550..00000000000
--- a/addons/process/process_report.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
diff --git a/addons/process/process_view.xml b/addons/process/process_view.xml
index dfafcf1c90e..2f38b3b5713 100644
--- a/addons/process/process_view.xml
+++ b/addons/process/process_view.xml
@@ -2,186 +2,112 @@
-
+
-
-
- process.process.form
- process.process
- form
-
-
-
-
+
+
+ process.process.form
+ process.process
+ form
+
+
+
+
-
- process.process.tree
- process.process
- tree
-
-
-
-
-
-
-
+
+ process.process.tree
+ process.process
+ tree
+
+
+
+
+
+
+
-
- Process
- process.process
- form
- tree,form
-
-
-
-
-
-
- process.node.tree
- process.node
- tree
-
-
-
-
-
-
-
-
-
-
-
-
- process.node.form
- process.node
- form
-
-
-
-
-
-
- Process Node
- process.node
- form
- tree,form
-
-
-
-
-
-
- Process Transitions
- process.transition
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Process Transitions
- process.transition
- tree
-
-
-
-
-
-
-
-
-
-
- Process Transitions
- process.transition
- form
-
-
+
+ Process
+ process.process
+ form
+ tree,form
+
+
diff --git a/addons/process/report/__init__.py b/addons/process/report/__init__.py
deleted file mode 100644
index e1a4a6f4026..00000000000
--- a/addons/process/report/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# Copyright (c) 2005-TODAY TINY SPRL. (http://tiny.be) All Rights Reserved.
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-import report_process
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/process/report/ds.ttf b/addons/process/report/ds.ttf
deleted file mode 100644
index ffbce87ab78..00000000000
Binary files a/addons/process/report/ds.ttf and /dev/null differ
diff --git a/addons/process/report/gtk-help.png b/addons/process/report/gtk-help.png
deleted file mode 100644
index 791a108319f..00000000000
Binary files a/addons/process/report/gtk-help.png and /dev/null differ
diff --git a/addons/process/report/gtk-new.png b/addons/process/report/gtk-new.png
deleted file mode 100644
index b679e037ca3..00000000000
Binary files a/addons/process/report/gtk-new.png and /dev/null differ
diff --git a/addons/process/report/gtk-open.png b/addons/process/report/gtk-open.png
deleted file mode 100644
index 79cfedac988..00000000000
Binary files a/addons/process/report/gtk-open.png and /dev/null differ
diff --git a/addons/process/report/gtk-print.png b/addons/process/report/gtk-print.png
deleted file mode 100644
index 3fb674288e2..00000000000
Binary files a/addons/process/report/gtk-print.png and /dev/null differ
diff --git a/addons/process/report/process_print.py b/addons/process/report/process_print.py
deleted file mode 100644
index 491a0f8e019..00000000000
--- a/addons/process/report/process_print.py
+++ /dev/null
@@ -1,172 +0,0 @@
-# -*- encoding: utf-8 -*-
-import Image
-import ImageDraw
-import ImageFont
-import math
-
-import addons
-
-ROUNDED = 30
-BGCOLOR = (228,233,237)
-TITLECOLOR = (150,70,70)
-FONT = addons.get_module_resource('process', 'report/sb.ttf')
-BOXSIZE = (160,120)
-
-size = 800,600
-
-class draw(object):
- def _rounding_box(self, x, y, width, height, title=None, bgcolor=BGCOLOR):
- d = ImageDraw.Draw(self.img)
- DR = ROUNDED/2
- d.polygon( (x+DR,y,x+width-DR,y,x+width,y+DR,x+width,y+height-DR,x+width-DR,y+height,x+DR,y+height,x,y+height-DR,x,y+DR), fill=bgcolor)
- d.pieslice((x,y,x+ROUNDED,y+ROUNDED),180,270,fill=bgcolor)
- d.pieslice((x+width-ROUNDED,y,x+width,y+ROUNDED),270,0,fill=title and TITLECOLOR or bgcolor)
- d.pieslice((x+width-ROUNDED,y+height-ROUNDED,x+width,y+height),0,90,fill=bgcolor)
- d.pieslice((x,y+height-ROUNDED,x+ROUNDED,y+height),90,180,fill=bgcolor)
- if title:
- d.polygon( (x+width/5, y, x+width-DR, y, x+width, y+DR, x+width, y+20, x+width/5+15, y+20), fill=TITLECOLOR)
- self.draw_text(x+width/5+13, y+4, 10, title, (255,255,255), width*4/5-14)
-
- def node(self, x, y, width, height, title=None, start_color=BGCOLOR):
- self._rounding_box(x,y,BOXSIZE[0]-16,BOXSIZE[1], bgcolor=start_color)
- self._rounding_box(x+12,y,BOXSIZE[0]-16,BOXSIZE[1], bgcolor=(255,255,255))
- self._rounding_box(x+16,y,BOXSIZE[0]-16,BOXSIZE[1], title)
-
- def angle(self, arrow):
- if not arrow[1]-arrow[3]:
- angle = 180
- else:
- angle = math.atan(-(arrow[2]-arrow[0]) / (arrow[1]-arrow[3])) * 180 / math.pi
- angle = 270 - angle
- if arrow[3]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/sale.py b/addons/sale/sale.py
index 9f37dba4d17..4a52e8d4608 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -301,7 +301,7 @@ class sale_order(osv.osv):
def _inv_get(self, cr, uid, order, context={}):
return {}
- def _make_invoice(self, cr, uid, order, lines):
+ def _make_invoice(self, cr, uid, order, lines, context={}):
a = order.partner_id.property_account_receivable.id
if order.payment_term:
pay_term = order.payment_term.id
@@ -781,7 +781,7 @@ class sale_order_line(osv.osv):
if not product:
return {'value': {'th_weight' : 0, 'product_packaging': False,
'product_uos_qty': qty}, 'domain': {'product_uom': [],
- 'product_uos': []}}
+ 'product_uos': []}}
if not date_order:
date_order = time.strftime('%Y-%m-%d')
@@ -793,7 +793,7 @@ class sale_order_line(osv.osv):
pack = self.pool.get('product.packaging').browse(cr, uid, packaging, context)
q = product_uom_obj._compute_qty(cr, uid, uom, pack.qty, default_uom)
qty = qty - qty % q + q
- result['product_uom_qty'] = qty
+ result['product_uom_qty'] = qty
if uom:
uom2 = product_uom_obj.browse(cr, uid, uom)
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 70513649b4d..3eb36e82226 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -977,11 +977,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:
@@ -1069,6 +1069,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")
@@ -1234,4 +1239,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 a2cf1ac8a77..9a6b1c47076 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1257,3 +1257,4 @@
+