[IMP]sale:Improve sales wizard -Configure Picking Policy for Sales Order

bzr revid: aag@tinyerp.co.in-20110406091454-3jbbhyskp2icruh4
This commit is contained in:
aag (OpenERP)
2011-04-06 14:44:54 +05:30
parent 55968077fc
commit 656c2f2b53
2 changed files with 3 additions and 11 deletions
+1 -7
View File
@@ -1177,14 +1177,10 @@ class sale_config_picking_policy(osv.osv_memory):
_columns = {
'name': fields.char('Name', size=64),
'picking_policy': fields.selection([
('direct', 'Direct Delivery'),
('one', 'All at Once')
], 'Picking Default Policy', required=True, help="The Shipping Policy is used to configure per order if you want to deliver as soon as possible when one product is available or you wait that all products are available.."),
'order_policy': fields.selection([
('manual', 'Invoice Based on Sales Orders'),
('picking', 'Invoice Based on Deliveries'),
], 'Shipping Default Policy', required=True,
], 'Invoice Method', required=True,
help="You can generate invoices based on sales orders or based on shippings."),
'step': fields.selection([
('one', 'Delivery Order Only'),
@@ -1196,7 +1192,6 @@ class sale_config_picking_policy(osv.osv_memory):
"in one or two operations by the worker.")
}
_defaults = {
'picking_policy': 'direct',
'order_policy': 'manual',
'step': 'one'
}
@@ -1204,7 +1199,6 @@ class sale_config_picking_policy(osv.osv_memory):
def execute(self, cr, uid, ids, context=None):
for o in self.browse(cr, uid, ids, context=context):
ir_values_obj = self.pool.get('ir.values')
ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy)
ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], o.order_policy)
if o.step == 'two':
md = self.pool.get('ir.model.data')
+2 -4
View File
@@ -545,18 +545,16 @@
<attribute name="string">Configure Sales Order Logistics</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">Setup your sales workflow and default values.</attribute>
<attribute name="string">Define your invoice method. A services company usually invoices based on sale orders while a retailer usually invoices based on deliveries.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>15</attribute>
<attribute name='string'></attribute>
</xpath>
<group string="res_config_contents" position="replace">
<field name="picking_policy" groups="base.group_extended"/>
<newline/>
<field name="order_policy"/>
<newline/>
<field name="step"/>
<field name="step" groups="base.group_extended"/>
</group>
<xpath expr='//button[@name="action_skip"]' position='replace'/>
</data>