[IMP] various changes

sale_stock: fix test to match new order
project: remove create button on view
procurement: allow grouping by reason
mrp: use property_ids for order line
account: allow grouping by template

bzr revid: mat@openerp.com-20130528131559-1u7t50sicpc3c6xe
This commit is contained in:
Martin Trigaux 2013-05-28 15:15:59 +02:00
commit 7f643d5540
5 changed files with 10 additions and 3 deletions

View File

@ -68,6 +68,7 @@
<field name="parent_id" invisible="1"/>
<field name="type"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="template_id" invisible="1"/>
</tree>
</field>
</record>

View File

@ -34,6 +34,11 @@ class procurement_order(osv.osv):
'production_id': fields.many2one('mrp.production', 'Manufacturing Order'),
}
def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None):
result = super(procurement_order, self)._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, context)
result['property_ids'] = [(6, 0, [x.id for x in line.property_ids])]
return result
def check_produce_product(self, cr, uid, procurement, context=None):
''' Depict the capacity of the procurement workflow to produce products (not services)'''
return True

View File

@ -18,6 +18,7 @@
<field name="product_uom" string="Unit of Measure"/>
<field name="procure_method"/>
<field name="state"/>
<field name="name" placeholder="External note..." invisible="1"/>
<field name="message"/>
</tree>
</field>

View File

@ -6,7 +6,7 @@
<field name="name">project.task.history.cumulative.tree</field>
<field name="model">project.task.history.cumulative</field>
<field name="arch" type="xml">
<tree string="Tasks's Cumulative Flow">
<tree string="Tasks's Cumulative Flow" create="false">
<field name="date"/>
<field name="project_id"/>
<field name="task_id"/>

View File

@ -8,7 +8,7 @@
-
!python {model: stock.picking}: |
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
first_picking = self.browse(cr, uid, delivery_orders[0], context=context)
first_picking = self.browse(cr, uid, delivery_orders[-1], context=context)
if first_picking.force_assign(cr, uid, first_picking):
first_move = first_picking.move_lines[0]
values = {'move%s'%(first_move.id): {'product_qty': 2, 'product_uom':ref('product.product_uom_unit')}}
@ -19,7 +19,7 @@
!python {model: stock.picking}: |
import netsvc
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
last_delivery_order_id = delivery_orders[0]
last_delivery_order_id = delivery_orders[-1]
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'stock.picking', last_delivery_order_id, 'button_cancel', cr)
-