'''
_name = 'procurement.rule'
_description = "Procurement Rule"
+ _order = "name"
def _get_action(self, cr, uid, context=None):
return []
return res
_columns = {
- 'location_id': fields.many2one('stock.location', 'Destination Location'),
+ 'location_id': fields.many2one('stock.location', 'Procurement Location'),
'location_src_id': fields.many2one('stock.location', 'Source Location',
help="Source location is action=move"),
'route_id': fields.many2one('stock.location.route', 'Route',
<field name="arch" type="xml">
<form string="Procurement Rules" version="7.0">
<sheet>
- <div class="oe_title">
- <h1>
- <label string="Name"/>
- <field name="name" class="oe_inline"/>
- </h1>
- </div>
+ <separator string="Pull Rule"/>
+ <group>
+ <group>
+ <field name="name"/>
+ </group>
+ <group>
+ <field name="action"/>
+ </group>
+ </group>
+ <separator string="Informations"/>
<group>
<group>
+ <field name="procure_method" attrs="{'invisible': [('action', '!=', 'move')]}"/>
<field name="location_src_id" attrs="{'invisible': [('action', '!=', 'move')]}"/>
<field name="location_id"/>
- <field name="route_id"/>
- <field name="route_sequence"/>
- <field name="sequence"/>
+
</group>
<group>
- <field name="action"/>
<field name="picking_type_id" attrs="{'required': [('action', '!=', 'manufacture')]}"/>
- <field name="procure_method" attrs="{'invisible': [('action', '!=', 'move')]}"/>
- <field name="group_id"/>
+ <field name="route_id"/>
+ <field name="group_id" groups="base.group_no_one"/>
</group>
</group>
</sheet>
_inherit = 'procurement.rule'
_columns = {
- 'delay': fields.integer('Number of Hours'),
+ 'delay': fields.integer('Number of Days'),
'partner_address_id': fields.many2one('res.partner', 'Partner Address'),
'propagate': fields.boolean('Propagate cancel and split', help='If checked, when the previous move of the move (which was generated by a next procurement) is cancelled or split, the move generated by this move will too'),
}
<field name="model">procurement.rule</field>
<field name="inherit_id" ref="stock.view_procurement_rule_form"/>
<field name="arch" type="xml">
- <field name="location_id" position="after">
- <field name="delay"/>
- <field name="propagate"/>
+ <field name="group_id" position="after">
+ <field name="propagate"/>
+ <label for="delay" string="Delay"/>
+ <div>
+ <field name="delay" class="oe_inline"/>days
+ </div>
</field>
- <field name="group_id" position="before">
+ <field name="location_id" position="after">
<field name="partner_address_id"/>
</field>
</field>
<field name="company_id" groups="base.group_multi_company" />
<field name="picking_type_id"/>
<field name="auto"/>
- <field name="delay"/>
+ <label for="delay" string="Delay"/>
+ <div>
+ <field name="delay" class="oe_inline"/>days
+ </div>
</group>
</group>
</form>