-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[16.0][ADD] analytic_cleaning_database_operations: Cleaning all analy…
…tic operations from database.
- Loading branch information
Berezi
committed
Nov 19, 2024
1 parent
ca27938
commit 22fa9ef
Showing
8 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
===================================== | ||
Analytic Cleaning Database Operations | ||
===================================== | ||
|
||
Cleaning all analytic operations from database. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/odoo-addons/issues>`_. In case of trouble, | ||
please check there if your issue has already been reported. If you spotted | ||
it first, help us smash it by providing detailed and welcomed feedback. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Berezi Amubieta <[email protected]> | ||
* Ana Juaristi <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2024 Berezi Amubieta - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Analytic Cleaning Database Operations", | ||
"version": "16.0.1.0.0", | ||
"category": "Analytic", | ||
"license": "AGPL-3", | ||
"author": "AvanzOSC", | ||
"website": "https://github.com/avanzosc/odoo-addons", | ||
"depends": [ | ||
"cleaning_database_operations", | ||
"analytic", | ||
], | ||
"data": [ | ||
"views/cleaning_database_view.xml", | ||
], | ||
"installable": True, | ||
"auto_install": True, | ||
} |
31 changes: 31 additions & 0 deletions
31
analytic_cleaning_database_operations/i18n/analytic_cleaning_database_operations.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * analytic_cleaning_database_operations | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-19 14:53+0000\n" | ||
"PO-Revision-Date: 2024-11-19 14:53+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: analytic_cleaning_database_operations | ||
#: model_terms:ir.ui.view,arch_db:analytic_cleaning_database_operations.cleaning_database_form_view | ||
msgid "Analytic: Account Analytic Line." | ||
msgstr "" | ||
|
||
#. module: analytic_cleaning_database_operations | ||
#: model_terms:ir.ui.view,arch_db:analytic_cleaning_database_operations.cleaning_database_form_view | ||
msgid "Cleaning Analytic Operations" | ||
msgstr "" | ||
|
||
#. module: analytic_cleaning_database_operations | ||
#: model:ir.model,name:analytic_cleaning_database_operations.model_cleaning_database | ||
msgid "Cleaning Database Operations" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * analytic_cleaning_database_operations | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-19 14:53+0000\n" | ||
"PO-Revision-Date: 2024-11-19 14:53+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: analytic_cleaning_database_operations | ||
#: model_terms:ir.ui.view,arch_db:analytic_cleaning_database_operations.cleaning_database_form_view | ||
msgid "Analytic: Account Analytic Line." | ||
msgstr "Analítica: Línea analítica." | ||
|
||
#. module: analytic_cleaning_database_operations | ||
#: model_terms:ir.ui.view,arch_db:analytic_cleaning_database_operations.cleaning_database_form_view | ||
msgid "Cleaning Analytic Operations" | ||
msgstr "Limpieza de operaciones de analítica" | ||
|
||
#. module: analytic_cleaning_database_operations | ||
#: model:ir.model,name:analytic_cleaning_database_operations.model_cleaning_database | ||
msgid "Cleaning Database Operations" | ||
msgstr "Limpieza de operaciones en base de datos" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import cleaning_database |
13 changes: 13 additions & 0 deletions
13
analytic_cleaning_database_operations/models/cleaning_database.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2024 Berezi Amubieta - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from odoo import models | ||
|
||
|
||
class CleaningDatabase(models.Model): | ||
_inherit = "cleaning.database" | ||
|
||
def action_delete_analytic_operations(self): | ||
self.env.cr.execute( | ||
"DELETE FROM account_analytic_line WHERE company_id in %s", | ||
[tuple(self.company_ids.ids)], | ||
) |
23 changes: 23 additions & 0 deletions
23
analytic_cleaning_database_operations/views/cleaning_database_view.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="cleaning_database_form_view" model="ir.ui.view"> | ||
<field name="model">cleaning.database</field> | ||
<field | ||
name="inherit_id" | ||
ref="cleaning_database_operations.cleaning_database_form_view" | ||
/> | ||
<field name="arch" type="xml"> | ||
<button name="action_delete_accounting_operations" position="after"> | ||
<p>Analytic: Account Analytic Line.</p> | ||
<p> | ||
<button | ||
name="action_delete_analytic_operations" | ||
type="object" | ||
string="Cleaning Analytic Operations" | ||
class="oe_highlight" | ||
/> | ||
</p> | ||
</button> | ||
</field> | ||
</record> | ||
</odoo> |