Skip to content

Commit

Permalink
Merge PR #120 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by andhit-r
  • Loading branch information
ssi-bot committed Nov 26, 2023
2 parents b2cd1c8 + 06304c5 commit 0d7a6e1
Show file tree
Hide file tree
Showing 21 changed files with 1,107 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
for reqfile in requirements.txt ; do
if [ -f ${reqfile} ] ; then
result=0
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
Expand Down
56 changes: 56 additions & 0 deletions ssi_fixed_asset_from_inventory/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==========================
Fixed Asset From Inventory
==========================


Installation
============

To install this module, you need to:

1. Clone the branch 14.0 of the repository https://github.com/open-synergy/opnsynid-fixed-asset
2. Add the path to this repository in your configuration (addons-path)
3. Update the module list (Must be on developer mode)
4. Go to menu *Apps -> Apps -> Main Apps*
5. Search For *Fixed Asset From Inventory*
6. Install the module

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/open-synergy/opnsynid-fixed-asset/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed
and welcomed feedback.


Credits
=======
Inspired

Contributors
------------
* Luc De Meyer (Noviat)
* Frédéric Clementi (camptocamp)
* Florian Dacosta (Akretion)
* Stéphane Bidoul (Acsone)
* Michael Viriyananda <[email protected]>
* Andhitia Rama <[email protected]>
* Nur Azmi <[email protected]>

Inspired By:
- account_asset_managemenet <https://github.com/OCA/account-financial-tools/tree/8.0/account_asset_management>

Maintainer
----------

.. image:: https://simetri-sinergi.id/logo.png
:alt: PT. Simetri Sinergi Indonesia
:target: https://simetri-sinergi.id.com

This module is maintained by the PT. Simetri Sinergi Indonesia.
7 changes: 7 additions & 0 deletions ssi_fixed_asset_from_inventory/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2022 OpenSynergy Indonesia
# Copyright 2022 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import (
models,
)
40 changes: 40 additions & 0 deletions ssi_fixed_asset_from_inventory/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2022 OpenSynergy Indonesia
# Copyright 2022 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Fixed Asset From Inventory",
"version": "14.0.1.0.0",
"category": "Accounting & Finance",
"website": "https://simetri-sinergi.id",
"author": "PT. Simetri Sinergi Indonesia, OpenSynergy Indonesia",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"ssi_stock_fixed_asset",
"ssi_master_data_mixin",
"ssi_transaction_confirm_mixin",
"ssi_transaction_done_mixin",
"ssi_transaction_cancel_mixin",
"ssi_accounting_entry_mixin",
"ssi_company_currency_mixin",
],
"data": [
"security/ir_module_category_data.xml",
"security/res_group_data.xml",
"security/ir.model.access.csv",
"security/ir_rule_data.xml",
"data/approval_template_data.xml",
"data/policy_template_data.xml",
"data/ir_sequence_data.xml",
"data/sequence_template_data.xml",
"data/account_journal_data.xml",
"views/fixed_asset_from_inventory_type_views.xml",
"views/fixed_asset_from_inventory_views.xml",
],
"demo": [],
"images": [
"static/description/banner.png",
],
}
13 changes: 13 additions & 0 deletions ssi_fixed_asset_from_inventory/data/account_journal_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2022 OpenSynergy Indonesia
Copyright 2022 PT. Simetri Sinergi Indonesia
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<data noupdate="1">
<record id="journal_fai" model="account.journal">
<field name="name">Fixed Asset From Inventory</field>
<field name="code">FAI</field>
<field name="type">general</field>
</record>
</data>
</odoo>
27 changes: 27 additions & 0 deletions ssi_fixed_asset_from_inventory/data/approval_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 OpenSynergy Indonesia
Copyright 2023 PT. Simetri Sinergi Indonesia
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<odoo>
<data noupdate="1">
<record id="fixed_asset_from_inventory_approval_template" model="approval.template">
<field name="name">Standard</field>
<field name="model_id" ref="model_fixed_asset_from_inventory" />
<field name="sequence" eval="100" />
<field name="computation_method">use_python</field>
<field name="python_code">result = True</field>
<field name="validate_sequence" eval="1" />
</record>
<record
id="fixed_asset_from_inventory_approval_template_detail"
model="approval.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_approval_template" />
<field name="approver_selection_method">use_group</field>
<field
name="approver_group_ids"
eval="[(6,0,[ref('fixed_asset_from_inventory_validator_group')])]"
/>
</record>
</data>
</odoo>
18 changes: 18 additions & 0 deletions ssi_fixed_asset_from_inventory/data/ir_sequence_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 OpenSynergy Indonesia
Copyright 2023 PT. Simetri Sinergi Indonesia
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<odoo>
<data noupdate="1">
<record id="fixed_asset_from_inventory_sequence" model="ir.sequence">
<field name="name">Fixed Asset From Inventory</field>
<field name="code">fixed_asset_from_inventory</field>
<field name="prefix">FAI/%(range_year)s/</field>
<field eval="1" name="number_next" />
<field eval="1" name="number_increment" />
<field name="padding" eval="6" />
<field name="use_date_range" eval="1" />
<field eval="False" name="company_id" />
</record>
</data>
</odoo>
185 changes: 185 additions & 0 deletions ssi_fixed_asset_from_inventory/data/policy_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 OpenSynergy Indonesia
Copyright 2023 PT. Simetri Sinergi Indonesia
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<odoo>
<data noupdate="0">
<record id="fixed_asset_from_inventory_policy_template" model="policy.template">
<field name="name">Standard</field>
<field name="model_id" ref="model_fixed_asset_from_inventory" />
<field
name="state_field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','state')]"
/>
<field name="sequence" eval="100" />
<field name="python_code">result=True</field>
</record>

<!-- confirm -->
<record
id="fixed_asset_from_inventory_policy_template_detail_confirm"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','confirm_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','=','draft')]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('fixed_asset_from_inventory_user_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- approve -->
<record
id="fixed_asset_from_inventory_policy_template_detail_approve"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','approve_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','=','confirm')]"
/>
<field name="restrict_user" eval="0" />
<field name="restrict_additional" eval="1" />
<field name="additional_python_code">result = False
if env.user.id in document.active_approver_user_ids.ids:
result = True</field>
</record>

<!-- reject -->
<record
id="fixed_asset_from_inventory_policy_template_detail_reject"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','reject_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','=','confirm')]"
/>
<field name="restrict_user" eval="0" />
<field name="restrict_additional" eval="1" />
<field name="additional_python_code">result = False
if env.user.id in document.active_approver_user_ids.ids:
result = True</field>
</record>

<!-- restart approval -->
<record
id="fixed_asset_from_inventory_policy_template_detail_restart_approval"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','restart_approval_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','=','confirm')]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('fixed_asset_from_inventory_validator_group')])]"
/>
<field name="restrict_additional" eval="1" />
<field name="additional_python_code">result = False
if not document.approval_template_id:
result = True</field>
</record>

<!-- cancel -->
<record
id="fixed_asset_from_inventory_policy_template_detail_cancel"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','cancel_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','in',['draft','confirm','done'])]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('fixed_asset_from_inventory_validator_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- restart -->
<record
id="fixed_asset_from_inventory_policy_template_detail_restart"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','restart_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','in',['cancel','reject'])]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('fixed_asset_from_inventory_validator_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- manual number -->
<record
id="fixed_asset_from_inventory_policy_template_detail_manual_number"
model="policy.template_detail"
>
<field name="template_id" ref="fixed_asset_from_inventory_policy_template" />
<field
name="field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','manual_number_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','fixed_asset_from_inventory'),('value','=','draft')]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('fixed_asset_from_inventory_validator_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>
</data>
</odoo>
28 changes: 28 additions & 0 deletions ssi_fixed_asset_from_inventory/data/sequence_template_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 OpenSynergy Indonesia
Copyright 2023 PT. Simetri Sinergi Indonesia
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<odoo>
<data noupdate="1">
<record id="fixed_asset_from_inventory_sequence_template" model="sequence.template">
<field name="name">Standard</field>
<field name="model_id" ref="model_fixed_asset_from_inventory" />
<field name="sequence" eval="100" />
<field name="initial_string">/</field>
<field
name="sequence_field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','name')]"
/>
<field
name="date_field_id"
search="[('model_id.model','=','fixed_asset_from_inventory'),('name','=','date')]"
/>
<field name="computation_method">use_python</field>
<field name="python_code">result=True</field>
<field name="sequence_id" ref="fixed_asset_from_inventory_sequence" />
<field name="sequence_selection_method">use_sequence</field>
<field name="add_custom_prefix" eval="0" />
<field name="add_custom_suffix" eval="0" />
</record>
</data>
</odoo>
8 changes: 8 additions & 0 deletions ssi_fixed_asset_from_inventory/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright 2022 OpenSynergy Indonesia
# Copyright 2022 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import (
fixed_asset_from_inventory_type,
fixed_asset_from_inventory,
)
Loading

0 comments on commit 0d7a6e1

Please sign in to comment.