Add scheduler.procurement.log

Re-organize the code, so that each module xxx_usability only depend on xxx
This commit is contained in:
Alexis de Lattre
2016-04-03 10:53:35 +02:00
parent ad786e892f
commit c7908c38ed
13 changed files with 209 additions and 128 deletions

View File

@@ -40,3 +40,13 @@ class SaleOrderLine(models.Model):
product_tmpl_id = fields.Many2one(
'product.template', related='product_id.product_tmpl_id',
string='Product Template', readonly=True)
class ProcurementGroup(models.Model):
_inherit = 'procurement.group'
sale_ids = fields.One2many(
'sale.order', 'procurement_group_id', string='Sale Orders',
readonly=True)
picking_ids = fields.One2many(
'stock.picking', 'group_id', string='Pickings', readonly=True)

View File

@@ -34,5 +34,22 @@
</field>
</record>
<record id="procurement_group_form_view" model="ir.ui.view">
<field name="name">sale_stock_usability.procurement.group.form</field>
<field name="model">procurement.group</field>
<field name="inherit_id" ref="procurement.procurement_group_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_type']/.." position="after">
<group name="sale" string="Sale Orders">
<field name="sale_ids" nolabel="1"/>
</group>
<group name="picking" string="Pickings">
<field name="picking_ids" nolabel="1"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>