Filtering Product Name on Manufacturing Orders

Hi. Does anyone know how to filter a certain product on the Manufacturing Orders? We import the Manufacturing Orders logs on the Product History that we created under each Product and now we wanted to filter it according to the Product Name of it.


Hello,

In the action-view called to display the product history, you can add a jpql domain to filter on the current product. You can find an example on https://github.com/axelor/axelor-open-suite/blob/master/axelor-production/src/main/resources/views/Product.xml#L28

<action-view name="action-product-view-production-process" title="Production processes"
		model="com.axelor.apps.production.db.ProdProcess">
		<view type="grid" name="prod-process-grid"/>
		<view type="form" name="prod-process-form"/>
		<domain>self.product.id = :id </domain>
	</action-view>	

Regards

1 J'aime

Thank you so much. I’ll try it. Hope it’ll work. :slight_smile:

Hi, this is the code that we have to modify for customizing the filter. We just also added the action-view code in it but still, we received an error upon saving it. Please see the photo below for your reference. Thank you.

image

  <panel if="__config__.app.isApp('production')" if-module="axelor-production" name="productHistoryPanel" title="Product History" colSpan="12">
  <panel-dashlet name="manufOrdersPanel" colSpan="12" action="manufacturing.root.manuf.order"/>
	<action-view name="action-product-view-create-production-process" title="Production process" model="com.axelor.apps.production.db.ProdProcess">
	      <view type="form" name="prod-process-form"/>
	      <context name="_product" expr="eval: __this__"/>
    </action-view>

Hello,

The action-view must be defined outside the form view. There are many examples on github.

Regards