[IMP] mrp, mrp_xxx: Form and List views improved according to Checklist guidelines.

bzr revid: uco@tinyerp.com-20100914124506-y0ls43epnm2uutxr
This commit is contained in:
uco (Open ERP) 2010-09-14 18:15:06 +05:30
parent 8bbdc9f3f3
commit b2f4dce58f
8 changed files with 67 additions and 66 deletions

View File

@ -176,8 +176,8 @@ class mrp_bom(osv.osv):
'code': fields.char('Reference', size=16),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the bills of material without removing it."),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True,
help= "If a sub-product is used in several products, it can be useful to create its own BoM."\
"Though if you don't want separated production orders for this sub-product, select Set/Phantom as BoM type."\
help= "If a sub-product is used in several products, it can be useful to create its own BoM. "\
"Though if you don't want separated production orders for this sub-product, select Set/Phantom as BoM type. "\
"If a Phantom BoM is used for a root product, it will be sold and shipped as a set of components, instead of being produced."),
'method': fields.function(_compute_type, string='Method', method=True, type='selection', selection=[('',''),('stock','On Stock'),('order','On Order'),('set','Set / Pack')]),
'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."),
@ -476,7 +476,7 @@ class mrp_production(osv.osv):
'name': lambda x, y, z, c: x.pool.get('ir.sequence').get(y, z, 'mrp.production') or '/',
'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'mrp.production', context=c),
}
_order = 'date_planned asc, priority desc';
_order = 'priority desc, date_planned asc';
def _check_qty(self, cr, uid, ids):
orders = self.browse(cr, uid, ids)

View File

@ -8,7 +8,7 @@
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">MRP Modules Configuration</attribute>
<attribute name="string">MRP Application Configuration</attribute>
</form>
<separator string="title" position="attributes">
@ -22,7 +22,7 @@
<attribute name='string'></attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="attributes">
<attribute name="string">Configure</attribute>
<attribute name="string">_Configure</attribute>
</xpath>
<group colspan="8">
<field name="stock_location"/>

View File

@ -64,7 +64,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Properties">
<separator colspan="4" string="General Information"/>
<field colspan="4" name="name" select="1"/>
<field name="group_id" select="1"/>
<field name="composition" select="1"/>
@ -252,15 +251,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Routing">
<separator colspan="4" string="General Information"/>
<field name="name"/>
<field name="active" groups="base.group_extended"/>
<field name="code"/>
<field name="location_id"/>
<separator colspan="4" string="Description"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Work Center Operations"/>
<field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
<field name="active" groups="base.group_extended"/>
<notebook colspan="4">
<page string="Work Center Operations">
<field colspan="4" name="workcenter_lines" nolabel="1" widget="one2many_list"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
@ -380,7 +382,6 @@
<filter string='Type' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'type'}" />
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date_start'}"/>
</group>
</search>
</field>
@ -510,10 +511,10 @@
<field name="arch" type="xml">
<tree colors="blue:state in ('draft','confirmed');red:date_planned&lt;current_date and state not in ('done','cancel');black:date_planned&gt;=current_date;gray:state in ('done','cancel') " string="Manufacturing Orders">
<field name="name"/>
<field name="date_planned"/>
<field name="product_id"/>
<field name="product_qty" sum="Total Qty"/>
<field name="product_uom"/>
<field name="date_planned"/>
<field name="routing_id" groups="base.group_extended"/>
<field name="hour_total" sum="Total Hours" groups="base.group_extended"/>
<field name="cycle_total" sum="Total Cycles" groups="base.group_extended"/>
@ -638,16 +639,16 @@
states="done,cancel"/>
</tree>
</field>
<separator colspan="4"/>
<group col="9" colspan="4">
<field name="state"/>
<button name="action_compute" states="draft" string="Compute Data" type="object" icon="gtk-execute"/>
<button name="action_compute" states="draft" string="Compute Data" type="object" icon="terp-stock_format-scientific"/>
<button name="button_confirm" states="draft" string="Confirm Production" icon="gtk-apply"/>
<button name="button_produce" states="ready" string="Start Production" icon="gtk-execute"/>
<button name="button_produce" states="ready" string="Start Production" icon="terp-gtk-jump-to-ltr"/>
<button name="%(act_mrp_product_produce)d" states="in_production" string="Produce" icon="gtk-ok" type="action"/>
<button name="force_production" states="confirmed,picking_except" string="Force Reservation" type="object" icon="gtk-jump-to"/>
<button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-cancel"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking" icon="gtk-convert"/>
<button name="button_cancel" states="draft,ready,confirmed,in_production,picking_except" string="Cancel" icon="gtk-stop"/>
<button name="button_recreate" states="picking_except" string="Recreate Picking" icon="terp-document-new"/>
</group>
</page>
<page string="Finished Products">

View File

@ -14,12 +14,12 @@
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/form/field[@name='hour']" position="after">
<group colspan="8" col="8">
<field name="state"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close" help="Finish Order"/>
</group>
</xpath>
</field>
@ -32,12 +32,12 @@
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="/form/notebook/page/field[@name='workcenter_lines']/tree/field[@name='hour']" position="after">
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close"/>
<field name="state"/>
</xpath>
</field>
@ -49,7 +49,7 @@
<field name="type">tree</field>
<field name="inherit_id" eval="False"/>
<field name="arch" type="xml">
<tree string="Work Orders" colors="gray:state in ('done','cancel');black:state in ('draft','startworking');red: state=='pause'">
<tree string="Work Orders" colors="gray:state in ('done','cancel');black:state in ('draft','startworking') and date_planned&gt;=current_date;red:date_planned&lt;current_date and state not in ('done','cancel')">
<field name="production_id"/>
<field name="date_planned"/>
<field name="product"/>
@ -61,11 +61,11 @@
<field name="hour"/>
<field name="state" />
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert" help="Set to Draft"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward" help="Start Working"/>
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr" help="Start Working"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause" help="Resume Work Order"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel" help="Cancel Order"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop" help="Cancel Order"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause" help="Pause Work Order"/>
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok" help="Finish Order"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close" help="Finish Order"/>
</tree>
</field>
</record>
@ -111,15 +111,15 @@
<field name="uom"/>
</group>
<separator string="State" colspan="4"/>
<separator string="" colspan="4"/>
<group colspan="8" col="8">
<field name="state"/>
<button name="button_draft" string="Set Draft" states="cancel" icon="gtk-convert"/>
<button name="button_start_working" string="Start" states="draft" icon="gtk-go-forward"/>
<button name="button_start_working" string="Start" states="draft" icon="terp-gtk-jump-to-ltr"/>
<button name="button_resume" string="Resume" states="pause" icon="gtk-media-pause"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-cancel"/>
<button name="button_cancel" string="Cancel" states="draft,startworking" icon="gtk-stop"/>
<button name="button_pause" string="Pause" states="startworking" icon="gtk-media-pause"/>
<button name="button_done" string="Finished" states="startworking" icon="gtk-ok"/>
<button name="button_done" string="Finished" states="startworking" icon="terp-dialog-close"/>
</group>
</page>
</notebook>

View File

@ -109,7 +109,7 @@ class mrp_repair(osv.osv):
('invoice_except','Invoice Exception'),
('done','Done'),
('cancel','Cancel')
], 'Repair State', readonly=True,
], 'State', readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed repair order. \
\n* The \'Confirmed\' state is used when a user confirms the repair order. \
\n* The \'Ready to Repair\' state is used to start to repairing, user can start repairing only after repair order is confirmed. \

View File

@ -7,14 +7,13 @@
<field name="model">mrp.repair</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Repairs order">
<field name="name" select="1" />
<tree string="Repairs order" colors="gray:state in ('done','cancel');black:state not in ('done','cancel');blue:state=='draft'">
<field name="name" select="1" />
<field name="product_id" select="1" />
<field name="prodlot_id"/>
<field name="move_id"/>
<field name="partner_id"/>
<field name="address_id"/>
<field name="location_id"/>
<field name="move_id"/>
<field name="location_dest_id"/>
<field name="guarantee_limit"/>
<field name="state"/>
@ -94,22 +93,22 @@
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
<field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
</group>
<newline/>
<separator string="" colspan="4"/>
<group col="13" colspan="4">
<field name="state"/>
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="gtk-apply"/>
<button name="repair_ready" states="confirmed" string="Start Repair" icon="gtk-go-forward"/>
<button name="action_repair_start" states="ready" string="Start Repair" icon="gtk-go-forward"/>
<button name="action_repair_end" states="under_repair" string="End Repair" icon="gtk-ok"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="gtk-convert"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="gtk-apply"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="gtk-ok"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-cancel"/>
<button name="repair_confirm" states="draft" string="Confirm Repair" icon="terp-camera_test"/>
<button name="repair_ready" states="confirmed" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
<button name="action_repair_start" states="ready" string="Start Repair" icon="terp-gtk-jump-to-ltr"/>
<button name="action_repair_end" states="under_repair" string="End Repair" icon="terp-dialog-close"/>
<button name="invoice_recreate" states="invoice_except" string="Recreate Invoice" icon="terp-dolar"/>
<button name="invoice_corrected" states="invoice_except" string="Invoice Corrected" icon="terp-emblem-important"/>
<button name="action_invoice_create" states="2binvoiced" string="Make Invoice" icon="terp-dolar"/>
<button name="%(action_cancel_repair)d" states="invoice_except" string="Cancel Repair" type="action" icon="gtk-stop"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-cancel"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-cancel"/>
<button name="cancel" states="draft" string="Cancel Repair" icon="gtk-stop"/>
<button name="%(action_cancel_repair)d" states="confirmed,2binvoiced,ready,under_repair" string="Cancel Repair" type="action" icon="gtk-stop"/>
</group>
</page>
<page string="Invoicing">
@ -153,18 +152,18 @@
</tree>
</field>
</page>
<page string="Quality">
<separator colspan="4" string="Internal Notes"/>
<field colspan="4" name="internal_notes" nolabel="1"/>
<separator colspan="4" string="Quotation Notes"/>
<field colspan="4" name="quotation_notes" nolabel="1"/>
</page>
<page string="Extra Info" groups="base.group_extended">
<field name="invoice_id"/>
<field name="picking_id"/>
<field name="location_id"/>
<field name="location_dest_id" attrs="{'readonly':[('deliver_bool','=', False)], 'required':[('deliver_bool','=', True)]}"/>
</page>
<page string="Notes">
<separator colspan="4" string="Internal Notes"/>
<field colspan="4" name="internal_notes" nolabel="1"/>
<separator colspan="4" string="Quotation Notes"/>
<field colspan="4" name="quotation_notes" nolabel="1"/>
</page>
</notebook>
</form>
</field>

View File

@ -14,10 +14,10 @@
<field name="group"/>
<newline/>
<group col="2" colspan="4">
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="make_invoices" string="Create Invoice"
colspan="1" type="object" icon="gtk-ok" />
<button icon='gtk-stop' special="cancel"
string="_Close" />
<button name="make_invoices" string="Create _Invoice"
colspan="1" type="object" icon="terp-dolar" />
</group>
</form>
</field>

View File

@ -78,7 +78,8 @@
<field name="name"/>
<field name="manager"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="attendance_ids" colspan="4"/>
<separator string="" colspan="4"/>
<field name="attendance_ids" colspan="4" nolabel="1"/>
</form>
</field>
</record>