[IMP] stock: Task 590-tracking id added, 596-stock move report,view changed for change_standard_price wizard
bzr revid: mso@mso-20100504132806-vdrkkkoirva1ja4g
This commit is contained in:
@@ -35,8 +35,10 @@ class report_stock_move(osv.osv):
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'product_id':fields.many2one('product.product', 'Product', readonly=True),
|
||||
'location_id':fields.many2one('stock.location', 'Location', readonly=True),
|
||||
'location_id': fields.many2one('stock.location', 'Source Location', readonly=True, select=True, help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
|
||||
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', readonly=True, select=True, help="Location where the system will stock the finished products."),
|
||||
'product_qty':fields.integer('Qty',readonly=True),
|
||||
'product_uom': fields.many2one('product.uom', 'Product UOM', readonly=True),
|
||||
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
|
||||
help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\
|
||||
\nThe state is \'Waiting\' if the move is waiting for another one.'),
|
||||
@@ -53,10 +55,12 @@ class report_stock_move(osv.osv):
|
||||
to_char(date_trunc('day',m.date), 'MM') as month,
|
||||
to_char(date_trunc('day',m.date), 'YYYY-MM-DD') as day,
|
||||
m.location_id as location_id,
|
||||
m.location_dest_id as location_dest_id,
|
||||
m.product_id as product_id,
|
||||
m.state as state,
|
||||
sum(m.product_qty) as product_qty
|
||||
from stock_move as m group by m.product_id, m.location_id, m.id, m.date, m.state
|
||||
m.product_uom as product_uom,
|
||||
sum(m.product_qty) as product_qty
|
||||
from stock_move as m group by m.id, m.product_id, m.location_id, m.location_dest_id, m.date, m.state, m.product_uom
|
||||
)
|
||||
""")
|
||||
report_stock_move()
|
||||
|
||||
@@ -11,10 +11,13 @@
|
||||
<field name="year" invisible="1" />
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="location_id" invisible="1"/>
|
||||
<field name="location_dest_id" invisible="1"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="location_id"/>
|
||||
<field name="product_uom"/>
|
||||
<field name="state"/>
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -47,7 +50,7 @@
|
||||
domain="[('month','=',time.strftime('%%m'))]"
|
||||
help="Stock Moves of this month"/>
|
||||
<filter icon="terp-stock"
|
||||
string="Current Stock"
|
||||
string="Today"
|
||||
separator="1"
|
||||
domain="[('date', '=', time.strftime('%%Y-%%m-%%d')]"
|
||||
help="Stock Moves of today"/>
|
||||
@@ -69,13 +72,16 @@
|
||||
help = "Completed Stock-Moves"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id" select="1" widget="selection"/>
|
||||
<field name="location_id" select="1" widget="selection"/>
|
||||
<field name="product_id"/>
|
||||
<field name="location_id" widget = "selection"/>
|
||||
<field name="location_dest_id" widget = "selection"/>
|
||||
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." >
|
||||
<filter string="Product" icon="terp-stock" context="{'group_by':'product_id'}"/>
|
||||
<filter string="Location" icon="terp-stock" context="{'group_by':'location_id'}"/>
|
||||
<filter string="Source Location" icon="terp-stock" context="{'group_by':'location_id'}"/>
|
||||
<filter string="Dest. Location" icon="terp-stock" context="{'group_by':'location_dest_id'}"/>
|
||||
<filter string="State" icon="terp-stock" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Day" icon="terp-stock" context="{'group_by':'day'}"/>
|
||||
|
||||
@@ -1418,6 +1418,7 @@
|
||||
<field name="backorder_id"/>
|
||||
<field name="state"/>
|
||||
<button name="%(action_partial_move)d" string="Partial" type="action" states="assigned" icon="gtk-justify-fill"/>
|
||||
<button name="action_done" states="assigned" string="Done" type="object" icon="gtk-jump-to"/>
|
||||
<button name="action_cancel" states="assigned,confirmed" string="Cancel" type="object" icon="gtk-cancel"/>
|
||||
</tree>
|
||||
</field>
|
||||
@@ -1491,6 +1492,10 @@
|
||||
<field name="product_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group col='8' colspan='14' expand="1" string="Tracking Lots">
|
||||
<field name="tracking_id" widget="selection" context="{'tracking_id': self}" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="4" col="8">
|
||||
<filter string="Product" icon="terp-stock" domain="[]" context="{'group_by':'product_id'}"/>
|
||||
<filter string="State" icon="terp-stock" domain="[]" context="{'group_by':'state'}"/>
|
||||
|
||||
@@ -7,17 +7,12 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Change Standard Price">
|
||||
<field name="new_price" on_change="onchange_price(new_price, context)" context="{'active_id': active_id}"/>
|
||||
<newline/>
|
||||
<field name="stock_account_input" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('enable_stock_in_out_acc','=',False)]}"/>
|
||||
<newline/>
|
||||
<field name="stock_account_output" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('enable_stock_in_out_acc','=',True)]}"/>
|
||||
<newline/>
|
||||
<field name="stock_journal"/>
|
||||
<field name="enable_stock_in_out_acc" invisible="1"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="change_price" string="Change" type="object" icon="gtk-ok"/>
|
||||
<field name="new_price"/>
|
||||
<separator string="" colspan="4" />
|
||||
<label string="" colspan="2"/>
|
||||
<group col="2" colspan="2">
|
||||
<button special="cancel" string="_Cancel" icon="gtk-cancel"/>
|
||||
<button name="change_price" string="_Apply" type="object" icon="gtk-apply"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user