Revert "[ADD]mrp: add product category on manufacturing order and bill of materials"

This reverts commit 9fa38eeab2.

Conflicts:
	addons/mrp/mrp_view.xml
This commit is contained in:
Fabien Pinckaers
2015-08-29 17:14:19 +02:00
parent 4064a60631
commit c0403fed09
2 changed files with 1 additions and 23 deletions
-16
View File
@@ -149,9 +149,6 @@ class mrp_bom(osv.osv):
_description = 'Bill of Material'
_inherit = ['mail.thread']
def _get_bom_ids_from_product_template_ids(self, cr, uid, product_template_ids, context=None):
return self.pool['mrp.bom'].search(cr, uid, [('product_tmpl_id', 'in', product_template_ids)], context=context)
_columns = {
'code': fields.char('Reference', size=16),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the bills of material without removing it."),
@@ -163,11 +160,6 @@ class mrp_bom(osv.osv):
domain="['&', ('product_tmpl_id','=',product_tmpl_id), ('type', 'in', ['product', 'consu']]",
help="If a product variant is defined the BOM is available only for this product."),
'bom_line_ids': fields.one2many('mrp.bom.line', 'bom_id', 'BoM Lines', copy=True),
'categ_id': fields.related('product_tmpl_id', 'categ_id', type='many2one', relation='product.category', string='Product Category', readonly=True,
store = {
'mrp.bom': (lambda self, cr, uid, ids, c=None: ids, ['product_tmpl_id'], 10),
'product.template': (_get_bom_ids_from_product_template_ids, ['categ_id'], 10)
}),
'product_qty': fields.float('Product Quantity', required=True, digits_compute=dp.get_precision('Product Unit of Measure')),
'product_uom': fields.many2one('product.uom', 'Product Unit of Measure', required=True, help="Unit of Measure (Unit of Measure) is the unit of measurement for the inventory control"),
'date_start': fields.date('Valid From', help="Validity of this BoM. Keep empty if it's always valid."),
@@ -548,9 +540,6 @@ class mrp_production(osv.osv):
res += self.pool.get("mrp.production").search(cr, uid, [('move_lines', 'in', move.id)], context=context)
return res
def _get_mo_ids_from_product_template_ids(self, cr, uid, product_template_ids, context=None):
return self.pool["mrp.production"].search(cr, uid , [('product_id.product_tmpl_id', 'in', product_template_ids)], context=context)
_columns = {
'name': fields.char('Reference', required=True, readonly=True, states={'draft': [('readonly', False)]}, copy=False),
'origin': fields.char('Source Document', readonly=True, states={'draft': [('readonly', False)]},
@@ -614,11 +603,6 @@ class mrp_production(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True),
'ready_production': fields.function(_moves_assigned, type='boolean', string="Ready for production", store={'stock.move': (_mrp_from_move, ['state'], 10)}),
'product_tmpl_id': fields.related('product_id', 'product_tmpl_id', type='many2one', relation='product.template', string='Product'),
'categ_id': fields.related('product_tmpl_id', 'categ_id', type='many2one', relation='product.category', string='Product Category', readonly=True,
store = {
'mrp.production': (lambda self, cr, uid, ids, c=None: ids, ['product_tmpl_id'], 10),
'product.template': (_get_mo_ids_from_product_template_ids, ['categ_id'], 10)
}),
}
_defaults = {
+1 -7
View File
@@ -394,7 +394,6 @@
will contain the raw materials, instead of the finished product.
</p>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
<field name="categ_id"/>
</group>
</group>
<notebook>
@@ -466,14 +465,12 @@
<field name="product_tmpl_id" string="Product"/>
<field name="product_id" string="Variant"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="categ_id"/>
<group expand="0" string="Group By...">
<filter string="Product" domain="[]" context="{'group_by':'product_tmpl_id'}"/>
<filter string='Default Unit of Measure' domain="[]" context="{'group_by' : 'product_uom'}"/>
<filter string="Work Order Operations" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string='Type' domain="[]" context="{'group_by' : 'type'}"/>
<filter string=" Valid From Month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
<filter string="Product Category" domain="[]" context="{'group_by':'categ_id'}"/>
<filter string="Valid From Month" domain="[]" context="{'group_by':'date_start'}" help="Valid From Date by Month"/>
</group>
</search>
</field>
@@ -621,7 +618,6 @@
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'mrp.group_mrp_user']}"/>
<field name="origin"/>
<field name="categ_id"/>
</group>
<group groups="stock.group_locations">
<field name="location_src_id" domain="[('usage','=','internal')]" on_change="location_id_change(location_src_id,location_dest_id)"/>
@@ -860,13 +856,11 @@
<field name="product_tmpl_id"/>
<field name="product_id"/>
<field name="routing_id" groups="mrp.group_mrp_routings"/>
<field name="categ_id"/>
<group expand="0" string="Group By...">
<filter string="Product" domain="[]" context="{'group_by':'product_id'}"/>
<filter string="Work Order Operations" domain="[]" context="{'group_by':'routing_id'}"/>
<filter string="Status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Scheduled Month" domain="[]" context="{'group_by':'date_planned'}" help="Scheduled Date by Month"/>
<filter string="Product Category" domain="[]" context="{'group_by':'categ_id'}"/>
</group>
</search>
</field>