Skip to content

Commit

Permalink
[UPD] ssi_stock_fixed_asset
Browse files Browse the repository at this point in the history
* Menambahkan informasi status fixed asset pada stock.production.lot
* Menambahkan usability terkait fixed asset pada search stock.production.lot
  • Loading branch information
andhit-r committed Aug 31, 2024
1 parent 6815639 commit cba6522
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ssi_stock_fixed_asset/models/stock_production_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ class StockProductionLot(models.Model):
string="Fixed Assets",
comodel_name="fixed.asset.asset",
)
fixed_asset_state = fields.Selection(
string="Fixed Asset State",
related="fixed_asset_id.state",
store=True,
)
30 changes: 29 additions & 1 deletion ssi_stock_fixed_asset/views/stock_production_lot_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<field name="inherit_id" ref="stock.view_production_lot_tree" />
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='product_id']" position="after">
<xpath expr="//field[last()]" position="after">
<field name="fixed_asset_id" />
<field name="fixed_asset_state" />
</xpath>
</data>
</field>
Expand All @@ -24,6 +25,32 @@
<data>
<xpath expr="//field[@name='product_id']" position="after">
<field name="fixed_asset_id" />
<field name="fixed_asset_state" />
</xpath>
<xpath expr="//group" position="before">
<filter
name="dom_is_fixed_asset"
string="Is Fixed Asset"
domain="[('fixed_asset_id','!=',False)]"
/>
<filter
name="dom_is_not_fixed_asset"
string="Is Not Fixed Asset"
domain="[('fixed_asset_id','=',False)]"
/>
<separator />
</xpath>
<xpath expr="//group" position="inside">
<filter
name="grp_fixed_asset"
string="Fixed Asset"
context="{'group_by': 'fixed_asset_id'}"
/>
<filter
name="grp_fixed_asset_state"
string="Fixed Asset State"
context="{'group_by': 'fixed_asset_state'}"
/>
</xpath>
</data>
</field>
Expand All @@ -39,6 +66,7 @@
<page name="fixed_asset" string="Fixed Asset">
<group name="fixed_asset_1" colspan="4" col="2">
<field name="fixed_asset_id" />
<field name="fixed_asset_state" />
</group>
</page>
</xpath>
Expand Down

0 comments on commit cba6522

Please sign in to comment.