Skip to content
Snippets Groups Projects
Commit a4bc01910783 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Hide default ``date`` field

obsoleted by accounting date this module adds.
parent f5f5ca9e6ade
No related branches found
No related tags found
1 merge request!13Topic/13.0/hide date
Pipeline #30949 passed
......@@ -2,6 +2,11 @@
Changelog
=========
13.0.1.2.0
----------
Hide default ``date`` field, obsoleted by accounting date this module adds.
13.0.1.1.2
----------
......
......@@ -16,6 +16,9 @@
Periods are filled based on an accounting date this module adds which users
may however set in advance.
This module also adds a transaction date in accounting documents.
Dates reworked in accounting documents / invoices:
* Add accounting date used to select the right period.
* Add transaction date.
* Hide default ``date`` field, obsoleted by accounting date above.
Inspired from what used to be available in previous Odoo versions.
......@@ -22,7 +22,7 @@
"name": "Accounting Periods",
"license": "AGPL-3",
"summary": "Add period accounting concept",
"version": "13.0.1.1.2",
"version": "13.0.1.2.0",
"category": "Accounting/Accounting",
"author": "XCG Consulting",
"website": "https://odoo.consulting/",
......
......@@ -23,6 +23,7 @@
class AccountMove(models.Model):
"""Add a period & dates onto accounting documents.
See module README for details.
"""
_inherit = "account.move"
......
......@@ -3,6 +3,30 @@
<!-- Add a period & dates onto accounting documents. -->
<!-- Inherit from the acc doc list view defined in "account". -->
<record id="account_period_account_move_list" model="ir.ui.view">
<field name="name">account_period_account_move_list</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_tree" />
<field name="arch" type="xml">
<!-- Add fields. -->
<xpath expr="//field[@name='date']" position="before">
<field name="period_id" />
</xpath>
<xpath expr="//field[@name='date']" position="after">
<field name="accounting_date" />
<field name="transaction_date" />
</xpath>
<!-- Hide default date field, obsoleted by accounting date this module adds. -->
<xpath expr="//field[@name='date']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<!-- Inherit from the acc doc form view defined in "account". -->
<record id="account_period_account_move_form" model="ir.ui.view">
<field name="name">account_period_account_move_form</field>
......@@ -19,6 +43,12 @@
<field name="transaction_date"
invisible="context.get('default_type', 'entry') != 'entry'" />
</xpath>
<!-- Hide default date field, obsoleted by accounting date this module adds. -->
<xpath expr="//field[@name='date']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<!-- invoicing_date is only for invoice menus (but not accounting entries). -->
<xpath expr="//label[@for='invoice_date']/.." position="attributes">
<attribute name="invisible">context.get('default_type', 'entry') == 'entry'</attribute>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment