first commit

This commit is contained in:
Suherdy Yacob 2026-01-21 17:06:46 +07:00
commit 225c743eee
8 changed files with 38 additions and 0 deletions

1
__init__.py Normal file
View File

@ -0,0 +1 @@
from . import models

17
__manifest__.py Normal file
View File

@ -0,0 +1,17 @@
{
'name': 'Asset Code Field',
'version': '17.0.1.0.0',
'category': 'Accounting/Accounting',
'summary': 'Adds Asset Code field to Account Asset',
'description': """
This module adds a new field "Asset Code" to the Asset form view, located below the Asset Name.
""",
'author': 'Antigravity',
'depends': ['account_asset'],
'data': [
'views/account_asset_views.xml',
],
'installable': True,
'application': False,
'license': 'LGPL-3',
}

Binary file not shown.

1
models/__init__.py Normal file
View File

@ -0,0 +1 @@
from . import account_asset

Binary file not shown.

Binary file not shown.

6
models/account_asset.py Normal file
View File

@ -0,0 +1,6 @@
from odoo import models, fields
class AccountAsset(models.Model):
_inherit = 'account.asset'
asset_code = fields.Char(string='Asset Code')

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_account_asset_form_inherit_asset_code" model="ir.ui.view">
<field name="name">account.asset.form.inherit.asset.code</field>
<field name="model">account.asset</field>
<field name="inherit_id" ref="account_asset.view_account_asset_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="after">
<field name="asset_code" placeholder="e.g. FA-001"/>
</xpath>
</field>
</record>
</odoo>