Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
47
account_move_name_sequence/views/account_journal_views.xml
Executable file
47
account_move_name_sequence/views/account_journal_views.xml
Executable file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2021 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
@author: Moisés López <moylop260@vauxoo.com>
|
||||
@author: Francisco Luna <fluna@vauxoo.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_account_journal_form" model="ir.ui.view">
|
||||
<field name="model">account.journal</field>
|
||||
<field name="inherit_id" ref="account.view_account_journal_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="refund_sequence" position="before">
|
||||
<field
|
||||
name="sequence_id"
|
||||
required="1"
|
||||
context="{
|
||||
'default_name': name,
|
||||
'default_company_id': company_id,
|
||||
'default_implementation': 'no_gap',
|
||||
'default_padding': 4,
|
||||
'default_use_date_range': True,
|
||||
'default_prefix': (code or 'UNKNOWN') + '/%%(range_year)s/'
|
||||
}"
|
||||
/>
|
||||
</field>
|
||||
<field name="refund_sequence" position="after">
|
||||
<field
|
||||
name="refund_sequence_id"
|
||||
invisible="type not in ('sale', 'purchase') or not refund_sequence"
|
||||
required="type in ('sale', 'purchase') and refund_sequence"
|
||||
context="{
|
||||
'default_name': name,
|
||||
'default_company_id': company_id,
|
||||
'default_implementation': 'no_gap',
|
||||
'default_padding': 4,
|
||||
'default_use_date_range': True,
|
||||
'default_prefix': 'R' + (code or 'UNKNOWN') + '/%%(range_year)s/'
|
||||
}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
29
account_move_name_sequence/views/account_move_views.xml
Executable file
29
account_move_name_sequence/views/account_move_views.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright 2021 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='highest_name']/.." position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//div[hasclass('oe_title')]//field[@name='name']"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="invisible">name == '/'</attribute>
|
||||
<attribute name="readonly">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('oe_title')]//h1//span" position="attributes">
|
||||
<attribute name="invisible">state != 'draft' or name != '/'</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user