From be6d08ec563d3f804f04cc800186eb68032b45b8 Mon Sep 17 00:00:00 2001 From: danila12 Date: Thu, 11 Jan 2024 18:03:15 +0200 Subject: [PATCH] dezactivare calcul unit price --- l10n_ro_edi_check/README.rst | 7 ++++--- l10n_ro_edi_check/__manifest__.py | 2 +- l10n_ro_edi_check/models/account_move.py | 11 +++++++++++ l10n_ro_edi_check/readme/DESCRIPTION.rst | 5 +++-- l10n_ro_edi_check/static/description/index.html | 11 ++++++++--- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/l10n_ro_edi_check/README.rst b/l10n_ro_edi_check/README.rst index 9088286d..3041265e 100644 --- a/l10n_ro_edi_check/README.rst +++ b/l10n_ro_edi_check/README.rst @@ -7,7 +7,7 @@ Romania - EDI data check and queue !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:0ae5b6f80e3e3d136c1b701026f7e4c17637f941d5f4d2be1edcfc851a23f084 + !! source digest: sha256:2670c0de37d5788be945fc1e758bacefbe751da939ce0d106cf680fb5013779d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -22,8 +22,9 @@ Romania - EDI data check and queue |badge1| |badge2| |badge3| -Verificare date pentru trimitere ANAF la validarea facturii -Implementare cu coada job-uri + - Verificare date pentru trimitere ANAF la validarea facturii + - Implementare cu coada job-uri + - Dezactivare recalculare pret unitar la facuri furnizor cu ID eFactura **Table of contents** diff --git a/l10n_ro_edi_check/__manifest__.py b/l10n_ro_edi_check/__manifest__.py index 5982970d..111e7b3f 100644 --- a/l10n_ro_edi_check/__manifest__.py +++ b/l10n_ro_edi_check/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Romania - EDI data check and queue", "license": "AGPL-3", - "version": "15.0.0.0.1", + "version": "15.0.0.0.2", "author": "Terrabit," "Odoo Community Association (OCA)", "website": "https://github.com/OCA/l10n-romania", "category": "Tools", diff --git a/l10n_ro_edi_check/models/account_move.py b/l10n_ro_edi_check/models/account_move.py index 1d86c3d5..75c25148 100644 --- a/l10n_ro_edi_check/models/account_move.py +++ b/l10n_ro_edi_check/models/account_move.py @@ -31,3 +31,14 @@ def action_post(self): errors_text = "\n".join(errors) raise UserError(errors_text) return res + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + def _get_computed_price_unit(self): + self.ensure_one() + if self.move_id.move_type not in ["in_invoice", "in_refund"] or not self.move_id.l10n_ro_edi_download: + return super()._get_computed_price_unit() + else: + return self.price_unit diff --git a/l10n_ro_edi_check/readme/DESCRIPTION.rst b/l10n_ro_edi_check/readme/DESCRIPTION.rst index 4ab67f89..770d116b 100644 --- a/l10n_ro_edi_check/readme/DESCRIPTION.rst +++ b/l10n_ro_edi_check/readme/DESCRIPTION.rst @@ -1,2 +1,3 @@ -Verificare date pentru trimitere ANAF la validarea facturii -Implementare cu coada job-uri + - Verificare date pentru trimitere ANAF la validarea facturii + - Implementare cu coada job-uri + - Dezactivare recalculare pret unitar la facuri furnizor cu ID eFactura diff --git a/l10n_ro_edi_check/static/description/index.html b/l10n_ro_edi_check/static/description/index.html index 887e17f1..04f9adc6 100644 --- a/l10n_ro_edi_check/static/description/index.html +++ b/l10n_ro_edi_check/static/description/index.html @@ -367,11 +367,16 @@

Romania - EDI data check and queue

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:0ae5b6f80e3e3d136c1b701026f7e4c17637f941d5f4d2be1edcfc851a23f084 +!! source digest: sha256:2670c0de37d5788be945fc1e758bacefbe751da939ce0d106cf680fb5013779d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 dhongu/l10n-romania

-

Verificare date pentru trimitere ANAF la validarea facturii -Implementare cu coada job-uri

+
+ +

Table of contents