[IMP] account: allow to archive journal, account.tag and analytic.tag
Currently there is no option to Archive / Unarchive Journal + Accounting Tag + Analytic Account Tag task: https://www.odoo.com/web#id=27447&view_type=form&model=project.task&menu_id=4720 PR: #12864
This commit is contained in:
@@ -35,6 +35,7 @@ class AccountAccountTag(models.Model):
|
||||
name = fields.Char(required=True)
|
||||
applicability = fields.Selection([('accounts', 'Accounts'), ('taxes', 'Taxes')], required=True, default='accounts')
|
||||
color = fields.Integer('Color Index', default=10)
|
||||
active = fields.Boolean(default=True, help="Set active to false to hide the Account Tag without removing it.")
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Accounts
|
||||
@@ -236,6 +237,7 @@ class AccountJournal(models.Model):
|
||||
|
||||
name = fields.Char(string='Journal Name', required=True)
|
||||
code = fields.Char(string='Short Code', size=5, required=True, help="The journal entries of this journal will be named using this prefix.")
|
||||
active = fields.Boolean(default=True, help="Set active to false to hide the Journal without removing it.")
|
||||
type = fields.Selection([
|
||||
('sale', 'Sale'),
|
||||
('purchase', 'Purchase'),
|
||||
|
||||
@@ -230,6 +230,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Account Journal">
|
||||
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Journal"/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<filter domain="[('type', '=', 'sale')]" string="Sales"/>
|
||||
<filter domain="[('type', '=', 'purchase')]" string="Purchases"/>
|
||||
<filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity"/>
|
||||
@@ -245,6 +246,11 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Journal">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="object" name="toggle_active" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name" class="oe_inline"/></h1>
|
||||
@@ -431,9 +437,16 @@
|
||||
<field name="model">account.account.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Tags">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="object" name="toggle_active" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -9,6 +9,7 @@ class AccountAnalyticTag(models.Model):
|
||||
_description = 'Analytic Tags'
|
||||
name = fields.Char(string='Analytic Tag', index=True, required=True)
|
||||
color = fields.Integer('Color Index', default=10)
|
||||
active = fields.Boolean(default=True, help="Set active to false to hide the Analytic Tag without removing it.")
|
||||
|
||||
|
||||
class AccountAnalyticAccount(models.Model):
|
||||
|
||||
@@ -15,9 +15,16 @@
|
||||
<field name="model">account.analytic.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Accounts Tags">
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button class="oe_stat_button" type="object" name="toggle_active" icon="fa-archive">
|
||||
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
|
||||
</button>
|
||||
</div>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user