first commit
This commit is contained in:
commit
225c743eee
1
__init__.py
Normal file
1
__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import models
|
||||
17
__manifest__.py
Normal file
17
__manifest__.py
Normal 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',
|
||||
}
|
||||
BIN
__pycache__/__init__.cpython-312.pyc
Normal file
BIN
__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
1
models/__init__.py
Normal file
1
models/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
from . import account_asset
|
||||
BIN
models/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
models/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
models/__pycache__/account_asset.cpython-312.pyc
Normal file
BIN
models/__pycache__/account_asset.cpython-312.pyc
Normal file
Binary file not shown.
6
models/account_asset.py
Normal file
6
models/account_asset.py
Normal file
@ -0,0 +1,6 @@
|
||||
from odoo import models, fields
|
||||
|
||||
class AccountAsset(models.Model):
|
||||
_inherit = 'account.asset'
|
||||
|
||||
asset_code = fields.Char(string='Asset Code')
|
||||
13
views/account_asset_views.xml
Normal file
13
views/account_asset_views.xml
Normal 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>
|
||||
Loading…
Reference in New Issue
Block a user