From 47e7b2c78fbcd27230ff1969f75d5e3971670a52 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers <fp@tinyerp.com> Date: Sun, 17 Oct 2010 23:30:29 +0200 Subject: [PATCH] [IMP] Access rights and __openerp__ cleaning bzr revid: fp@tinyerp.com-20101017213029-79yh7xvz06ii8dgo --- addons/account_voucher/__openerp__.py | 2 +- addons/base_synchro/__openerp__.py | 2 +- addons/document_email/__openerp__.py | 1 - addons/email_template/__openerp__.py | 2 +- addons/fetchmail/__openerp__.py | 1 - addons/hr_payroll/__openerp__.py | 2 +- addons/hr_payroll_account/__openerp__.py | 2 +- addons/procurement/security/ir.model.access.csv | 4 +++- addons/project/project.py | 2 +- addons/project/project_view.xml | 6 ++---- addons/project_gtd/project_gtd.py | 9 +++++---- addons/purchase/security/ir.model.access.csv | 2 +- addons/sale/security/ir.model.access.csv | 3 ++- addons/stock/stock_view.xml | 6 +++--- 14 files changed, 22 insertions(+), 22 deletions(-) diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 683cca2442e7..ce5cd6073325 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -22,7 +22,7 @@ { "name" : "Accounting Voucher Entries", "version" : "1.0", - "author" : 'OpenERP SA & Axelor', + "author" : 'OpenERP SA', "description": """Account Voucher module includes all the basic requirements of Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc... * Voucher Entry diff --git a/addons/base_synchro/__openerp__.py b/addons/base_synchro/__openerp__.py index bd285821e2b4..3bb46827d689 100644 --- a/addons/base_synchro/__openerp__.py +++ b/addons/base_synchro/__openerp__.py @@ -22,7 +22,7 @@ { "name":"Base Synchro", "version":"0.1", - "author":"Tiny", + "author":"OpenERP SA", "category":"Generic Modules/Base", "description": """Synchronization with all objects.""", "depends":["base"], diff --git a/addons/document_email/__openerp__.py b/addons/document_email/__openerp__.py index 0348665ffa0e..6f61ba628581 100644 --- a/addons/document_email/__openerp__.py +++ b/addons/document_email/__openerp__.py @@ -25,7 +25,6 @@ "name" : "Email Integrated Document", "version" : "1.1", "depends" : ["base", "document", "fetchmail","mail_gateway"], - "author" : "Tiny", "description": """Email Integrated Document * Email based Document submission * user based document submission diff --git a/addons/email_template/__openerp__.py b/addons/email_template/__openerp__.py index 9469104bd27f..d5f5e9776d30 100644 --- a/addons/email_template/__openerp__.py +++ b/addons/email_template/__openerp__.py @@ -23,7 +23,7 @@ { "name" : "Email Template for OpenERP", "version" : "0.7 RC", - "author" : "Sharoon Thomas, Openlabs", + "author" : "Openlabs", "website" : "http://openerp.com", "category" : "Added functionality", "depends" : ['marketing'], diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py index 94dbdf4ef5c5..e9050fda0756 100644 --- a/addons/fetchmail/__openerp__.py +++ b/addons/fetchmail/__openerp__.py @@ -33,7 +33,6 @@ * Automatic Email Receive * Email based Records (Add, Update) """, - 'author': 'Tiny', 'website': 'http://www.openerp.com', 'init_xml': [], 'update_xml': [ diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py index c9339ce013c0..65b593c5891a 100644 --- a/addons/hr_payroll/__openerp__.py +++ b/addons/hr_payroll/__openerp__.py @@ -33,7 +33,7 @@ * Monthly Payroll Register * Integrated with Holiday Management """, - 'author':'OpenERP SA/Axelor', + 'author':'OpenERP SA', 'website':'http://www.openerp.com', 'depends': [ 'hr', diff --git a/addons/hr_payroll_account/__openerp__.py b/addons/hr_payroll_account/__openerp__.py index 97ae94a361ca..d65570a1ad95 100644 --- a/addons/hr_payroll_account/__openerp__.py +++ b/addons/hr_payroll_account/__openerp__.py @@ -28,7 +28,7 @@ * Payment Encoding * Company Contribution Management """, - 'author':'OpenERP SA/Axelor', + 'author':'OpenERP SA', 'website':'http://www.openerp.com', 'depends': [ 'hr_payroll', diff --git a/addons/procurement/security/ir.model.access.csv b/addons/procurement/security/ir.model.access.csv index 5bf81a079c66..382543c9df40 100644 --- a/addons/procurement/security/ir.model.access.csv +++ b/addons/procurement/security/ir.model.access.csv @@ -1,6 +1,8 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "access_procurement","procurement.order","model_procurement_order","base.group_user",1,0,0,0 -"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","stock.group_stock_manager",1,1,1,1 +"access_procurement_stock_manager","procurement.order stock.manager","model_procurement_order","stock.group_stock_manager",1,1,1,1 +"access_procurement_stock_user","procurement.order stock.user","model_procurement_order","stock.group_stock_user",1,1,1,1 +"access_stock_warehouse_orderpoint","stock.warehouse.orderpoint","model_stock_warehouse_orderpoint","stock.group_stock_user",1,1,1,1 "access_stock_warehouse_orderpoint_system","stock.warehouse.orderpoint system","model_stock_warehouse_orderpoint","stock.group_stock_manager",1,1,1,1 "access_mrp_property_group","mrp.property.group","model_mrp_property_group","stock.group_stock_manager",1,1,1,1 "access_mrp_property","mrp.property","model_mrp_property","stock.group_stock_manager",1,1,1,1 diff --git a/addons/project/project.py b/addons/project/project.py index 640df9017d83..e60845764f7a 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -402,7 +402,7 @@ class task(osv.osv): 'description': fields.text('Description'), 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Priority'), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."), - 'type_id': fields.many2one('project.task.type', 'Type',), + 'type_id': fields.many2one('project.task.type', 'Stage'), 'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True, help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\ \n If the task is over, the states is set to \'Done\'.'), diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index a69903c34d20..8cf262237daa 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -311,7 +311,7 @@ <field name="user_id" invisible="context.get('user_invisible', False)"/> <field name="delegated_user_id" invisible="context.get('show_delegated', True)"/> <field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)"/> - <field name="date_deadline" invisible="context.get('set_visible',False)"/> + <field name="date_deadline" invisible="context.get('deadline_visible',True)"/> <field name="type_id" groups="base.group_extended" invisible="context.get('set_visible',False)"/> <button name="next_type" invisible="context.get('set_visible',False)" states="draft,open,pending" @@ -388,11 +388,9 @@ icon="gtk-execute" groups="base.group_extended"/> <separator orientation="vertical"/> - <filter string="Deadlines" domain="[('date_deadline','<>',False)]" help="Show only tasks having a deadline" icon="terp-gnome-cpu-frequency-applet+"/> + <filter string="Deadlines" context="{'deadline_visible': False}" domain="[('date_deadline','<>',False)]" help="Show only tasks having a deadline" icon="terp-gnome-cpu-frequency-applet+"/> <separator orientation="vertical"/> <field name="name" select="1"/> - <field name="type_id" widget="selection"/> - <separator orientation="vertical"/> <field name="project_id" select="1"> <filter domain="[('project_id.user_id','=',uid)]" help="My Projects" icon="terp-personal"/> </field> diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py index 092738d2cf69..bac2f621f376 100644 --- a/addons/project_gtd/project_gtd.py +++ b/addons/project_gtd/project_gtd.py @@ -29,7 +29,7 @@ class project_gtd_context(osv.osv): _name = "project.gtd.context" _description = "Context" _columns = { - 'name': fields.char('Context', size=64, required=True, select=1), + 'name': fields.char('Context', size=64, required=True, select=1, translate=1), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of contexts."), } _defaults = { @@ -44,7 +44,7 @@ class project_gtd_timebox(osv.osv): _name = "project.gtd.timebox" _order = "sequence" _columns = { - 'name': fields.char('Timebox', size=64, required=True, select=1), + 'name': fields.char('Timebox', size=64, required=True, select=1, translate=1), 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of timebox."), 'icon': fields.selection(tools.icons, 'Icon', size=64), } @@ -104,9 +104,10 @@ class project_task(osv.osv): res = super(project_task,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) search_extended = False timebox_obj = self.pool.get('project.gtd.timebox') - if res['type'] == 'search': + access_pool = self.pool.get('ir.model.access') + if (res['type'] == 'search') and access_pool.check_groups(cr, uid, "project_gtd.group_project_getting"): tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[])) - search_extended ='''<newline/><group col="%d" expand="1" string="%s" groups="project_gtd.group_project_getting">''' % (len(tt)+7,_('Getting Things Done')) + search_extended ='''<newline/><group col="%d" expand="%d" string="%s">''' % (len(tt)+7,1,_('Getting Things Done')) search_extended += '''<filter domain="[('timebox_id','=', False)]" context="{'set_editable':True,'set_visible':True,'gtd_visible':True,'user_invisible':True}" icon="gtk-new" help="Undefined Timebox" string="%s"/>''' % (_('Inbox'),) search_extended += '''<filter context="{'set_editable':True,'set_visible':True,'gtd_visible':True,'user_invisible':True}" icon="gtk-new" string="%s"/>''' % (_('GTD'),) search_extended += '''<separator orientation="vertical"/>''' diff --git a/addons/purchase/security/ir.model.access.csv b/addons/purchase/security/ir.model.access.csv index 77a0aff7bb43..ef854f8f0388 100644 --- a/addons/purchase/security/ir.model.access.csv +++ b/addons/purchase/security/ir.model.access.csv @@ -18,7 +18,7 @@ "access_stock_picking_purchase_user_manager","stock.picking","stock.model_stock_picking","group_purchase_manager",1,1,1,1 "access_stock_move_purchase_user_manager","stock.move","stock.model_stock_move","group_purchase_manager",1,1,1,1 "access_account_tax_purchase_user_manager","account.tax","account.model_account_tax","group_purchase_manager",1,0,0,0 -"access_product_product_purchase_user","product.product.purchase.user","product.model_product_product","group_purchase_user",1,1,1,1 +"access_product_product_purchase_user","product.product.purchase.user","product.model_product_product","group_purchase_user",1,0,0,0 "access_product_product_purchase_manager","product.product.purchase.manager","product.model_product_product","group_purchase_manager",1,0,0,0 "access_product_template_purchase_user","product.template purchase_user","product.model_product_template","group_purchase_user",1,1,1,1 "access_product_template_purchase_manager","product.template purchase_manager","product.model_product_template","group_purchase_manager",1,0,0,0 diff --git a/addons/sale/security/ir.model.access.csv b/addons/sale/security/ir.model.access.csv index 426d30b52fef..11718051d043 100644 --- a/addons/sale/security/ir.model.access.csv +++ b/addons/sale/security/ir.model.access.csv @@ -1,7 +1,8 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_sale_shop","sale.shop","model_sale_shop","base.group_sale_salesman",1,0,0,0 +"access_sale_shop","sale.shop","model_sale_shop","base.group_user",1,0,0,0 "access_sale_order","sale.order","model_sale_order","base.group_sale_salesman",1,1,1,0 "access_sale_order_line","sale.order.line","model_sale_order_line","base.group_sale_salesman",1,1,1,1 +"access_account_invoice_tax_salesman","account_invoice_tax salesman","account.model_account_invoice_tax","base.group_sale_salesman",1,1,1,0 "access_account_invoice_salesman","account_invoice salesman","account.model_account_invoice","base.group_sale_salesman",1,1,1,0 "access_account_invoice_manager","account_invoice manager","account.model_account_invoice","base.group_sale_manager",1,1,1,1 "access_account_invoice_line_salesman","account_invoice.line salesman","account.model_account_invoice_line","base.group_sale_salesman",1,1,1,0 diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 0b2ecea565f6..9a53b6d01d2c 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -93,6 +93,7 @@ <page string="General Informations"> <field colspan="4" name="inventory_line_id" nolabel="1" widget="one2many_list"> <tree string="Products" editable="bottom"> + <field colspan="4" domain="[('usage','=','internal')]" name="location_id"/> <field context="location=location_id,uom=product_uom" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom)" domain="[('type','<>','service')]"/> <field name="product_qty"/> <field name="product_uom"/> @@ -100,21 +101,20 @@ <button name="%(stock.action_view_stock_inventory_line_split)d" string="Split inventory lines" groups="base.group_extended" type="action" icon="terp-stock_effects-object-colorize" states="draft"/> - <field colspan="4" domain="[('usage','=','internal')]" name="location_id"/> <field name="state" invisible="True"/> </tree> <form string="Products "> + <field domain="[('usage','=','internal')]" name="location_id"/> + <newline/> <field colspan="4" context="location=location_id,uom=product_uom" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom)" domain="[('type','<>','service')]"/> <field name="product_qty"/> <field name="product_uom"/> - <field domain="[('usage','=','internal')]" name="location_id"/> <group colspan="2" col="4"> <field name="prod_lot_id" groups="base.group_extended"/> <button name="%(stock.action_view_stock_inventory_line_split)d" string="Split inventory lines" groups="base.group_extended" type="action" icon="terp-stock_effects-object-colorize"/> </group> - </form> </field> </page><page string="Posted Inventory" groups="base.group_extended"> -- GitLab