[IMP stock_location: invoice_state is now explicitly given
bzr revid: qdp@cyan-20100610130036-b09n81bmweu2i803
This commit is contained in:
parent
7c72cd000c
commit
97686eb283
|
@ -73,7 +73,7 @@ class procurement_order(osv.osv):
|
|||
'move_type': 'one',
|
||||
'address_id': line.partner_address_id.id,
|
||||
'note': line.name, # TODO: note on procurement ?
|
||||
'invoice_state': 'none',
|
||||
'invoice_state': line.invoice_state,
|
||||
})
|
||||
move_id = self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': line.name,
|
||||
|
|
|
@ -33,6 +33,12 @@ class stock_location_path(osv.osv):
|
|||
'location_from_id' : fields.many2one('stock.location', 'Source Location', ondelete='cascade', select=1),
|
||||
'location_dest_id' : fields.many2one('stock.location', 'Destination Location', ondelete='cascade', select=1),
|
||||
'delay': fields.integer('Delay (days)', help="Number of days to do this transition"),
|
||||
'invoice_state': fields.selection([
|
||||
("invoiced", "Invoiced"),
|
||||
("2binvoiced", "To Be Invoiced"),
|
||||
("none", "Not from Picking")], "Invoice Status",
|
||||
required=True,),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'auto': fields.selection(
|
||||
[('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
|
||||
'Automatic Move',
|
||||
|
@ -45,7 +51,8 @@ class stock_location_path(osv.osv):
|
|||
}
|
||||
_defaults = {
|
||||
'auto': lambda *arg: 'auto',
|
||||
'delay': lambda *arg: 1
|
||||
'delay': lambda *arg: 1,
|
||||
'invoice_state': lambda *args: 'none',
|
||||
}
|
||||
stock_location_path()
|
||||
|
||||
|
@ -63,12 +70,18 @@ class product_pulled_flow(osv.osv):
|
|||
'partner_address_id': fields.many2one('res.partner.address', 'Partner Address'),
|
||||
'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal'),('delivery','Delivery')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"),
|
||||
'product_id':fields.many2one('product.product','Product'),
|
||||
'invoice_state': fields.selection([
|
||||
("invoiced", "Invoiced"),
|
||||
("2binvoiced", "To Be Invoiced"),
|
||||
("none", "Not from Picking")], "Invoice Status",
|
||||
required=True,),
|
||||
}
|
||||
_defaults = {
|
||||
'cancel_cascade': lambda *arg: False,
|
||||
'procure_method': lambda *args: 'make_to_stock',
|
||||
'type_proc': lambda *args: 'move',
|
||||
'picking_type':lambda *args:'out',
|
||||
'invoice_state': lambda *args: 'none',
|
||||
}
|
||||
product_pulled_flow()
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
<field name="partner_address_id"/>
|
||||
<field name="procure_method"/>
|
||||
<field name="cancel_cascade"/>
|
||||
<field name="invoice_state"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -74,6 +75,7 @@
|
|||
<field name="auto"/>
|
||||
<field name="delay"/>
|
||||
<field name="name"/>
|
||||
<field name="invoice_state"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue