[IMP] move type field in sale module and improve default state in crm_claim

bzr revid: shp@tinyerp.com-20121010113323-wpxt81u5p3hmwl6w
This commit is contained in:
pankita shah (Open ERP) 2012-10-10 17:03:23 +05:30
parent 2ac0273835
commit 8bbd857198
6 changed files with 8 additions and 8 deletions

View File

@ -123,7 +123,8 @@ class crm_claim(base_stage, osv.osv):
'date': fields.datetime.now,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'active': lambda *a: 1
'active': lambda *a: 1,
'stage_id':lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c)
}
def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):

View File

@ -118,8 +118,7 @@
<button name="case_cancel" string="Cancel" type="object"
states="draft,open,pending"/>
</span>
<field name="stage_id" widget="statusbar"
on_change="onchange_stage_id(stage_id)"/>
<field name="stage_id" widget="statusbar"/>
</header>
<sheet string="Claims">
<group>

View File

@ -710,6 +710,8 @@ class sale_order_line(osv.osv):
'invoice_lines': fields.many2many('account.invoice.line', 'sale_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True),
'invoiced': fields.boolean('Invoiced', readonly=True),
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
help="If 'on order', it triggers a procurement when the sale order is confirmed to create a task, purchase order or manufacturing order linked to this sale order line."),
'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')),
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft': [('readonly', False)]}),
'address_allotment_id': fields.many2one('res.partner', 'Allotment Partner'),

View File

@ -224,8 +224,8 @@
</group>
<group>
<field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
<field name="type"/>
<field name="th_weight"/>
<!-- we should put a config wizard for these two fields -->
<field name="address_allotment_id"/>
</group>

View File

@ -490,8 +490,6 @@ class sale_order_line(osv.osv):
_columns = {
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the shipping of the products to the customer", readonly=True, states={'draft': [('readonly', False)]}),
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft': [('readonly', False)]},
help="If 'on order', it triggers a procurement when the sale order is confirmed to create a task, purchase order or manufacturing order linked to this sale order line."),
'property_ids': fields.many2many('mrp.property', 'sale_order_line_property_rel', 'order_id', 'property_id', 'Properties', readonly=True, states={'draft': [('readonly', False)]}),
'product_packaging': fields.many2one('product.packaging', 'Packaging'),
'move_ids': fields.one2many('stock.move', 'sale_line_id', 'Inventory Moves', readonly=True),

View File

@ -80,12 +80,12 @@
</tree>
</field>
</field>
<xpath expr="//page[@string='Order Lines']/field[@name='order_line']/form[@string='Sales Order Lines']/group/group/field[@name='th_weight']" position="before">
<xpath expr="//page[@string='Order Lines']/field[@name='order_line']/form[@string='Sales Order Lines']/group/group/field[@name='type']" position="before">
<label for="delay"/>
<div>
<field name="delay" class="oe_inline"/> days
</div>
<field name="type"/>
</xpath>
<xpath expr="//page[@string='Order Lines']/field[@name='order_line']/form[@string='Sales Order Lines']/group/group/field[@name='address_allotment_id']" position="after">
<field name="property_ids" widget="many2many_tags"