Sanjay Gohel (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons20-mrp-sgo into
lp:openobject-addons.
Requested reviews:
Amit Patel (OpenERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons20-mrp-sgo/+merge/133039
hello,
I have done following changes.
1. if repair order is in confirm make some field readonly.
2. compute button in repair order's form view changed to link, like in
SO/PO/invoice.
Thank You.
Sanjay Gohel
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons20-mrp-sgo/+merge/133039
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons20-mrp-sgo.
=== modified file 'mrp_repair/mrp_repair.py'
--- mrp_repair/mrp_repair.py 2012-10-24 20:18:59 +0000
+++ mrp_repair/mrp_repair.py 2012-11-06 11:27:22 +0000
@@ -115,10 +115,10 @@
return result.keys()
_columns = {
- 'name': fields.char('Repair Reference',size=24, required=True),
+ 'name': fields.char('Repair Reference',size=24, required=True, states={'confirmed':[('readonly',True)]}),
'product_id': fields.many2one('product.product', string='Product to Repair', required=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'partner_id' : fields.many2one('res.partner', 'Partner', select=True, help='Choose partner for whom the order will be invoiced and delivered.'),
- 'address_id': fields.many2one('res.partner', 'Delivery Address', domain="[('parent_id','=',partner_id)]"),
+ 'partner_id' : fields.many2one('res.partner', 'Partner', select=True, help='Choose partner for whom the order will be invoiced and delivered.', states={'confirmed':[('readonly',True)]}),
+ 'address_id': fields.many2one('res.partner', 'Delivery Address', domain="[('parent_id','=',partner_id)]", states={'confirmed':[('readonly',True)]}),
'default_address_id': fields.function(_get_default_address, type="many2one", relation="res.partner"),
'prodlot_id': fields.many2one('stock.production.lot', 'Lot Number', select=True, states={'draft':[('readonly',False)]},domain="[('product_id','=',product_id)]"),
'state': fields.selection([
@@ -137,10 +137,10 @@
\n* The \'To be Invoiced\' status is used to generate the invoice before or after repairing done. \
\n* The \'Done\' status is set when repairing is completed.\
\n* The \'Cancelled\' status is used when user cancel repair order.'),
- 'location_id': fields.many2one('stock.location', 'Current Location', select=True, readonly=True, states={'draft':[('readonly',False)]}),
- 'location_dest_id': fields.many2one('stock.location', 'Delivery Location', readonly=True, states={'draft':[('readonly',False)]}),
+ 'location_id': fields.many2one('stock.location', 'Current Location', select=True, readonly=True, states={'draft':[('readonly',False)], 'confirmed':[('readonly',True)]}),
+ 'location_dest_id': fields.many2one('stock.location', 'Delivery Location', readonly=True, states={'draft':[('readonly',False)], 'confirmed':[('readonly',True)]}),
'move_id': fields.many2one('stock.move', 'Move',required=True, domain="[('product_id','=',product_id)]", readonly=True, states={'draft':[('readonly',False)]}),
- 'guarantee_limit': fields.date('Warranty Expiration', help="The warranty expiration limit is computed as: last move date + warranty defined on selected product. If the current date is below the warranty expiration limit, each operation and fee you will add will be set as 'not to invoiced' by default. Note that you can change manually afterwards."),
+ 'guarantee_limit': fields.date('Warranty Expiration', help="The warranty expiration limit is computed as: last move date + warranty defined on selected product. If the current date is below the warranty expiration limit, each operation and fee you will add will be set as 'not to invoiced' by default. Note that you can change manually afterwards.", states={'confirmed':[('readonly',True)]}),
'operations' : fields.one2many('mrp.repair.line', 'repair_id', 'Operation Lines', readonly=True, states={'draft':[('readonly',False)]}),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', help='Pricelist of the selected partner.'),
'partner_invoice_id':fields.many2one('res.partner', 'Invoicing Address'),
@@ -156,7 +156,7 @@
'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 and create a picking with selected product. Note that you can select the locations in the Info tab, if you have the extended view."),
+ 'deliver_bool': fields.boolean('Deliver', help="Check this box if you want to manage the delivery once the product is repaired and create a picking with selected product. Note that you can select the locations in the Info tab, if you have the extended view.", states={'confirmed':[('readonly',True)]}),
'invoiced': fields.boolean('Invoiced', readonly=True),
'repaired': fields.boolean('Repaired', readonly=True),
'amount_untaxed': fields.function(_amount_untaxed, string='Untaxed Amount',
=== modified file 'mrp_repair/mrp_repair_view.xml'
--- mrp_repair/mrp_repair_view.xml 2012-10-30 08:35:11 +0000
+++ mrp_repair/mrp_repair_view.xml 2012-11-06 11:27:22 +0000
@@ -109,9 +109,13 @@
<group class="oe_subtotal_footer oe_right">
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
- <field name="amount_total" sum="Total amount" class="oe_subtotal_footer_separator"/>
+ <div class="oe_subtotal_footer_separator oe_inline">
+ <label for="amount_total" />
+ <button name="button_dummy"
+ states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
+ </div>
+ <field name="amount_total" nolabel="1" sum="Total amount" class="oe_subtotal_footer_separator"/>
</group>
- <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
<div class="oe_clear"/>
</page>
<page string="Invoicing">
_______________________________________________
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