[MERGE] lp:831583

bzr revid: qdp-launchpad@openerp.com-20111018132630-8pw6y87djwktyp1b
This commit is contained in:
Quentin (OpenERP) 2011-10-18 15:26:30 +02:00
commit 69ba6cf654
4 changed files with 21 additions and 0 deletions

View File

@ -40,6 +40,7 @@ The aim is to have a complete module to manage all products repairs. The followi
'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',

View File

@ -154,6 +154,7 @@ class mrp_repair(osv.osv):
'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),
@ -179,6 +180,7 @@ class mrp_repair(osv.osv):
'deliver_bool': lambda *a: True,
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'mrp.repair'),
'invoice_method': lambda *a: 'none',
'company_id': lambda self, cr, uid, context: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.repair', context=context),
'pricelist_id': lambda self, cr, uid,context : self.pool.get('product.pricelist').search(cr, uid, [('type','=','sale')])[0]
}

View File

@ -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>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!-- 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>