Mayur Maheshwari(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-831583-mma into 
lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-831583-mma/+merge/72554

Hello,

   mrp_repair: Added a Company field and rule in mrp.repair

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-831583-mma/+merge/72554
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-831583-mma.
=== modified file 'mrp_repair/__openerp__.py'
--- mrp_repair/__openerp__.py	2011-03-18 14:06:18 +0000
+++ mrp_repair/__openerp__.py	2011-08-23 11:39:44 +0000
@@ -40,6 +40,7 @@
     'depends': ['mrp', 'sale', 'account'],
     'update_xml': [
         'security/ir.model.access.csv',
+        'security/mrp_repair_security.xml',
         'mrp_repair_sequence.xml',
         'wizard/mrp_repair_cancel_view.xml',
         'wizard/mrp_repair_make_invoice_view.xml',

=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py	2011-08-15 14:21:41 +0000
+++ mrp_repair/mrp_repair.py	2011-08-23 11:39:44 +0000
@@ -153,6 +153,7 @@
         'fees_lines': fields.one2many('mrp.repair.fee', 'repair_id', 'Fees Lines', readonly=True, states={'draft':[('readonly',False)]}),
         'internal_notes': fields.text('Internal Notes'),
         'quotation_notes': fields.text('Quotation Notes'),
+        'company_id': fields.many2one('res.company', 'Company'),
         'deliver_bool': fields.boolean('Deliver', help="Check this box if you want to manage the delivery once the product is repaired. If cheked, it will create a picking with selected product. Note that you can select the locations in the Info tab, if you have the extended view."),
         'invoiced': fields.boolean('Invoiced', readonly=True),
         'repaired': fields.boolean('Repaired', readonly=True),

=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml	2011-06-15 13:48:31 +0000
+++ mrp_repair/mrp_repair_view.xml	2011-08-23 11:39:44 +0000
@@ -15,6 +15,7 @@
                 <field name="address_id"/>
                 <field name="location_id"/>
                 <field name="location_dest_id"/>
+                <field name="company_id" groups="base.group_multi_company" invisible="1"/>
                 <field name="guarantee_limit"/>
                 <field name="state"/>
             </tree>
@@ -159,6 +160,7 @@
                         <field name="picking_id"/>
                         <field name="location_id"/>
                         <field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
+                        <field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
                     </page>
                     <page string="Notes">
                         <separator colspan="4" string="Internal Notes"/>
@@ -199,6 +201,8 @@
                       <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                       <separator orientation="vertical"/>
                       <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'guarantee_limit'}" help="Guarantee limit"/>
+                      <separator orientation="vertical" groups="base.group_multi_company"/>
+                      <filter string="Company" icon="terp-go-home" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
                   </group>
              </search>
           </field>

=== added file 'mrp_repair/security/mrp_repair_security.xml'
--- mrp_repair/security/mrp_repair_security.xml	1970-01-01 00:00:00 +0000
+++ mrp_repair/security/mrp_repair_security.xml	2011-08-23 11:39:44 +0000
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="0">
+
+<!-- Multi -->
+    <record model="ir.rule" id="mrp_repair_rule">
+        <field name="name">mrp_repair multi-company</field>
+        <field name="model_id" search="[('model','=','mrp.repair')]" model="ir.model"/>
+        <field name="global" eval="True"/>
+        <field name="domain_force">['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]</field>
+    </record>
+
+    </data>
+</openerp>
\ No newline at end of file

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to