Hello,
how you show data on grid from other table, for example stock-move-line-all-grid view shows
this lines but on com.axelor.apps.stock.db.StockMoveLine this table there is no origin column. its comes from com.axelor.apps.stock.db.StockMove , i wantted to add some other colums but its not worked.
how to add other colums there or how to add more details, for examle i also need add column from invoice table
Hello
We can display dotted field from OneToOne Or ManyToOne referenced fields on view. Like the scenario you have specified here, we have stockMove referenced field (ManyToOne) in StockMoveLine domain. So stockMove.origin or stockMove.fromStockLocation.typeSelect can be accessed in view.
Thank you
and is it possible use groupBy on there, cz i using and its not working…
groupBy=« product.companyCostCategoryRu »
Hello
Yes, dotted field can be used for groupBy. For that you also have to add that dotted field in grid. If you don’t want to display it to users you can keep it hidden like hidden="true"
Thank you
thank you for answers, but i try to delee all fields and result not changed
stock-move-line-all-grid
com.axelor.apps.stock.db.StockMoveLine
<grid name="stock-move-line-all-grid" title="Stock move lines" model="com.axelor.apps.stock.db.StockMoveLine" orderBy="product.companyCostCategoryRu" groupBy="product.companyCostCategoryRu" canNew="false" canDelete="false" canMove="true" edit-icon="false">
<field name="product.companyCostCategoryRu" width="120" hidden="true"/>
</grid>
Hello
Keep at least one field in view. And after changes, need to reload the browser tab.
Hope this will help !
thank you
thank you again for your reply. but even though I refreshed the page, the columns there still remain in place, even though I removed all the columns to try, there is no change on the page… i tried using grupby in hr and yes it works, I just have problems with this view
Hello
You want to group by the grid using companyCostCategoryRu field of Product domain model where product is referenced field in StockMoveLine domain model.
So here I need some details. Is companyCostCategoryRu
a real field (added from Product domain model) Or custom field (added from Studio) ?
Thank you
the problem is that the columns were previously edited according to the image below.
I am showing the detail that those who will experience similar problems (forgetfulness in this case ) in the future should check.
you need to check this part before making any changes to the xml. and if you have some changes on there , you will see « reset » buton and you need reset this / if you dont have any changes you will not see reset buton on there…
if you not reset this, your xml changes will not show true results