diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 4849d3a7d8b..a8011e069c5 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -51,9 +51,9 @@ class hr_employee_category(osv.osv): _name = "hr.employee.category" _description = "Employee Category" _columns = { - 'name': fields.char("Category", size=64, required=True), + 'name': fields.char("Employee Tag", size=64, required=True), 'complete_name': fields.function(_name_get_fnc, type="char", string='Name'), - 'parent_id': fields.many2one('hr.employee.category', 'Parent Category', select=True), + 'parent_id': fields.many2one('hr.employee.category', 'Parent Employee Tag', select=True), 'child_ids': fields.one2many('hr.employee.category', 'parent_id', 'Child Categories'), 'employee_ids': fields.many2many('hr.employee', 'employee_category_rel', 'category_id', 'emp_id', 'Employees'), } @@ -129,7 +129,7 @@ class hr_job(osv.osv): } _sql_constraints = [ - ('name_company_uniq', 'unique(name, company_id)', 'The name of the job position must be unique per company!'), + ('name_company_uniq', 'unique(name, company_id, department_id)', 'The name of the job position must be unique per department in company!'), ] diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index f2be4844d27..f9eee9cd243 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -79,7 +79,7 @@ class hr_holidays_status(osv.osv): 'categ_id': fields.many2one('crm.meeting.type', 'Meeting Type', help='Once a leave is validated, OpenERP will create a corresponding meeting of this type in the calendar.'), 'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('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 in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Department.'), - 'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and take them into account for the "Remaining Legal Leaves" defined on the employee form.'), + 'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and will not take them into account for the "Remaining Legal Leaves" defined on the employee form.'), 'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the leave type without removing it."), 'max_leaves': fields.function(_user_left_days, string='Maximum Allowed', help='This value is given by the sum of all holidays requests with a positive value.', multi='user_left_days'), 'leaves_taken': fields.function(_user_left_days, string='Leaves Already Taken', help='This value is given by the sum of all holidays requests with a negative value.', multi='user_left_days'), diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 6fc926980dd..649b721eb46 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -376,11 +376,26 @@ class product_pricelist_item(osv.osv): result.append((-2, _('Supplier Prices on the product form'))) return result +# Added default function to fetch the Price type Based on Pricelist type. + def _get_default_base(self, cr, uid, fields, context=None): + product_price_type_obj = self.pool.get('product.price.type') + if fields.get('type') == 'purchase': + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field', '=', 'standard_price')], context=context) + elif fields.get('type') == 'sale': + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context=context) + else: + return -1 + if not product_price_type_ids: + return False + else: + pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0] + return pricetype.id + _name = "product.pricelist.item" _description = "Pricelist item" _order = "sequence, min_quantity desc" _defaults = { - 'base': lambda *a: -1, + 'base': _get_default_base, 'min_quantity': lambda *a: 0, 'sequence': lambda *a: 5, 'price_discount': lambda *a: 0, diff --git a/addons/product/pricelist_view.xml b/addons/product/pricelist_view.xml index a1b996b891b..784a14228d5 100644 --- a/addons/product/pricelist_view.xml +++ b/addons/product/pricelist_view.xml @@ -152,7 +152,7 @@ - +
@@ -160,7 +160,7 @@ - + diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index fd44353b177..37836b0e07a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -135,6 +135,7 @@
X
+
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index 91fb2525be6..dffe1ed54ff 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -174,8 +174,8 @@