diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 9a440d3705b..a37474db0af 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -334,11 +334,11 @@
-
+ groups="account.group_account_user"/>
diff --git a/addons/account_analytic_default/account_analytic_default_view.xml b/addons/account_analytic_default/account_analytic_default_view.xml
index ff09fb4b0db..d2b6a13d046 100644
--- a/addons/account_analytic_default/account_analytic_default_view.xml
+++ b/addons/account_analytic_default/account_analytic_default_view.xml
@@ -68,6 +68,22 @@
{"search_default_current":1}
+
+
+ Analytic Defaults
+ account.analytic.default
+ {'search_default_product_id': [active_id], 'default_product_id': active_id}
+
+
+ product.product.stock.move
+ product.product
+
+
+
+
+
+
+
-
-
diff --git a/addons/hr/hr.py b/addons/hr/hr.py
index 92bde22086e..467f34f708b 100644
--- a/addons/hr/hr.py
+++ b/addons/hr/hr.py
@@ -93,6 +93,10 @@ class hr_job(osv.osv):
_inherit = ['mail.thread']
_columns = {
'name': fields.char('Job Name', size=128, required=True, select=True),
+ # TO CLEAN: when doing a cleaning, we should change like this:
+ # no_of_recruitment: a function field
+ # expected_employees: float
+ # This would allow a clean update when creating new employees.
'expected_employees': fields.function(_no_of_employee, string='Total Forecasted Employees',
help='Expected number of employees for this job position after new recruitment.',
store = {
@@ -146,6 +150,7 @@ class hr_employee(osv.osv):
_name = "hr.employee"
_description = "Employee"
_inherits = {'resource.resource': "resource_id"}
+ _inherit = ['mail.thread']
def _get_image(self, cr, uid, ids, name, args, context=None):
result = dict.fromkeys(ids, False)
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index dc65fa80e8b..8767da6bd63 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -84,6 +84,10 @@
+
+
+
+
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index c81c4062a73..8c715149ff8 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -116,7 +116,10 @@ class hr_holidays(osv.osv):
},
}
- def _employee_get(self, cr, uid, context=None):
+ def _employee_get(self, cr, uid, context=None):
+ emp_id = context.get('default_employee_id', False)
+ if emp_id:
+ return emp_id
ids = self.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context)
if ids:
return ids[0]
@@ -203,9 +206,9 @@ class hr_holidays(osv.osv):
leave_ids = obj_res_leave.search(cr, uid, [('holiday_id', 'in', ids)], context=context)
return obj_res_leave.unlink(cr, uid, leave_ids, context=context)
- def onchange_type(self, cr, uid, ids, holiday_type):
- result = {'value': {'employee_id': False}}
- if holiday_type == 'employee':
+ def onchange_type(self, cr, uid, ids, holiday_type, employee_id=False, context=None):
+ result = {}
+ if holiday_type == 'employee' and not employee_id:
ids_employee = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
if ids_employee:
result['value'] = {
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index f8b4ad07b77..113d1267380 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -78,7 +78,7 @@
-
+
@@ -206,7 +206,8 @@
-
+
+
@@ -214,7 +215,6 @@
-
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index 5700a07f519..ff1010a45d5 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -420,12 +420,13 @@ class hr_applicant(base_stage, osv.Model):
act_window = self.pool.get('ir.actions.act_window')
emp_id = False
for applicant in self.browse(cr, uid, ids, context=context):
- address_id = False
+ address_id = contact_name = False
if applicant.partner_id:
address_id = self.pool.get('res.partner').address_get(cr,uid,[applicant.partner_id.id],['contact'])['contact']
- if applicant.job_id:
+ contact_name = self.pool.get('res.partner').name_get(cr,uid,[applicant.partner_id.id])[0][1]
+ if applicant.job_id and (applicant.partner_name or contact_name):
applicant.job_id.write({'no_of_recruitment': applicant.job_id.no_of_recruitment - 1})
- emp_id = hr_employee.create(cr,uid,{'name': applicant.partner_name or applicant.name,
+ emp_id = hr_employee.create(cr,uid,{'name': applicant.partner_name or contact_name,
'job_id': applicant.job_id.id,
'address_home_id': address_id,
'department_id': applicant.department_id.id
@@ -433,7 +434,7 @@ class hr_applicant(base_stage, osv.Model):
self.write(cr, uid, [applicant.id], {'emp_id': emp_id}, context=context)
self.case_close(cr, uid, [applicant.id], context)
else:
- raise osv.except_osv(_('Warning!'), _('You must define Applied Job for this applicant.'))
+ raise osv.except_osv(_('Warning!'), _('You must define an Applied Job and a Contact Name for this applicant.'))
action_model, action_id = model_data.get_object_reference(cr, uid, 'hr', 'open_view_employee_list')
dict_act_window = act_window.read(cr, uid, action_id, [])
diff --git a/addons/hr_recruitment/security/ir.model.access.csv b/addons/hr_recruitment/security/ir.model.access.csv
index 2d0b85faf70..4d0e4444014 100644
--- a/addons/hr_recruitment/security/ir.model.access.csv
+++ b/addons/hr_recruitment/security/ir.model.access.csv
@@ -10,3 +10,4 @@ access_hr_recruitment_source_hr_officer,hr.recruitment.source,model_hr_recruitme
access_hr_recruitment_source_all,hr.recruitment.source,model_hr_recruitment_source,,1,0,0,0
access_hr_applicant_category,hr.applicant_category,model_hr_applicant_category,,1,1,1,0
access_hr_applicant_category_manager,hr.applicant_category,model_hr_applicant_category,base.group_hr_manager,1,1,1,1
+access_crm_meeting_type_hr_officer,crm.meeting.type.officer,base_calendar.model_crm_meeting_type,base.group_hr_user,1,1,1,0
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index dd387620102..c975b766ccd 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -69,6 +69,7 @@
+
@@ -304,6 +305,7 @@
+
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index 00e8369e6b7..a09697edf65 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -980,26 +980,6 @@
-
-
-
-
@@ -1034,21 +1014,33 @@
id="menu_mrp_production_order_action" name="Order Planning"
parent="menu_mrp_planning" sequence="1"/>
-
+
+ BoM Structure
+ {'default_product_id': active_id}
+ [('product_id', 'in', active_ids),('bom_id','=',False)]
+ mrp.bom
+
{'default_product_id': active_id, 'search_default_product_id': active_id}
Bill of Materials
[('bom_id','=',False)]
mrp.bom
-
+
+ {'search_default_product_id': [active_id]}
+ Manufacturing Orders
+ mrp.production
+
+
product.product.procurement
product.product
-
+
+
+
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index a59838a3a01..4082c4cd12b 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -312,11 +312,13 @@
product.product.procurement
product.product
-
+
+
+
+
-
-
+
diff --git a/addons/project/res_config.py b/addons/project/res_config.py
index 2604ebde732..ddf98582ef3 100644
--- a/addons/project/res_config.py
+++ b/addons/project/res_config.py
@@ -34,7 +34,7 @@ class project_configuration(osv.osv_memory):
This installs the module project_mrp."""),
'module_pad': fields.boolean("Use integrated collaborative note pads on task",
help="""Lets the company customize which Pad installation should be used to link to new pads
- (by default, http://ietherpad.com/).
+ (for example: http://ietherpad.com/).
This installs the module pad."""),
'module_project_timesheet': fields.boolean("Record timesheet lines per tasks",
help="""This allows you to transfer the entries under tasks defined for Project Management to
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 3317c3bde59..8ba730567e2 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -334,8 +334,8 @@
Quotations
ir.actions.act_window
purchase.order
- {'search_default_draft': 1, 'search_default_to_approve': 1}
- [('state','in',('draft','sent','confirmed'))]
+ {}
+ [('state','in',('draft','sent','cancel'))]
tree,form,graph,calendar
@@ -492,15 +492,6 @@
-
-
-
On Purchase Order Lines
ir.actions.act_window
@@ -613,12 +604,20 @@
-
+
+ {'search_default_product_id': active_id, 'default_product_id': active_id}
+ Purchases
+ purchase.order.line
+
+
product.account.purchase.ok.form.inherit
product.product
+
+
+
@@ -627,6 +626,5 @@
-
diff --git a/addons/purchase/stock_view.xml b/addons/purchase/stock_view.xml
index 188baeccd69..14d1e313e7f 100644
--- a/addons/purchase/stock_view.xml
+++ b/addons/purchase/stock_view.xml
@@ -49,7 +49,7 @@
name="view_picking"
string="Incoming Shipments" states="approved"/>
+ string="Invoices" attrs="{'invisible': [('state', 'in', ['draft','sent'])]}"/>
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 18fdb739923..6eac8e085c1 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -538,15 +538,22 @@
[('invoiced','<>', 1),('state','=','done')]
-
-
-
+
+ {'search_default_product_id': active_id, 'default_product_id': active_id}
+ Sales Order Lines
+ sale.order.line
+
+
+
+ product.product.sale.order
+ product.product
+
+
+
+
+
+
+
diff --git a/addons/sale/wizard/sale_make_invoice_advance.py b/addons/sale/wizard/sale_make_invoice_advance.py
index 98d32fa0e80..5d3cc165b46 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.py
+++ b/addons/sale/wizard/sale_make_invoice_advance.py
@@ -78,7 +78,7 @@ class sale_advance_payment_inv(osv.osv_memory):
result = []
for sale in sale_obj.browse(cr, uid, sale_ids, context=context):
val = inv_line_obj.product_id_change(cr, uid, [], wizard.product_id.id,
- uom_id=False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id)
+ False, partner_id=sale.partner_id.id, fposition_id=sale.fiscal_position.id)
res = val['value']
# determine and check income account
@@ -86,7 +86,7 @@ class sale_advance_payment_inv(osv.osv_memory):
prop = ir_property_obj.get(cr, uid,
'property_account_income_categ', 'product.category', context=context)
prop_id = prop and prop.id or False
- account_id = fiscal_obj.map_account(cr, uid, sale.fiscal_position.id or False, prop_id)
+ account_id = fiscal_obj.map_account(cr, uid, sale.fiscal_position or False, prop_id)
if not account_id:
raise osv.except_osv(_('Configuration Error!'),
_('There is no income account defined as global property.'))
diff --git a/addons/stock/product.py b/addons/stock/product.py
index ba556884bba..1d56ce64988 100644
--- a/addons/stock/product.py
+++ b/addons/stock/product.py
@@ -235,6 +235,8 @@ class product_product(osv.osv):
else:
location_ids = []
wids = warehouse_obj.search(cr, uid, [], context=context)
+ if not wids:
+ return res
for w in warehouse_obj.browse(cr, uid, wids, context=context):
location_ids.append(w.lot_stock_id.id)
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 594843eff8d..dc80c0f950a 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -68,6 +68,10 @@
product.product
+
+
+
+
@@ -88,13 +92,16 @@
-
+
+
+
-
-
+
+
+
diff --git a/addons/stock/report/report_stock_view.xml b/addons/stock/report/report_stock_view.xml
index f56d738636d..e8bb6621355 100644
--- a/addons/stock/report/report_stock_view.xml
+++ b/addons/stock/report/report_stock_view.xml
@@ -2,13 +2,6 @@
-
-
+
+ {'product_id': active_id}
+ Stock by Location
+ stock.location
+
+
+ {'search_default_done': 1,'search_default_product_id': active_id, 'default_product_id': active_id}
+ Moves
+ stock.move
+
Location Structure
stock.location
@@ -1562,21 +1572,6 @@
res_model="product.product"
src_model="stock.location"/>
-
-
-
-
tree_but_open
stock.location