diff --git a/l10n_ro_account_edi_ubl/models/account_edi_format.py b/l10n_ro_account_edi_ubl/models/account_edi_format.py index dbf442dc9..66fa7d2dd 100644 --- a/l10n_ro_account_edi_ubl/models/account_edi_format.py +++ b/l10n_ro_account_edi_ubl/models/account_edi_format.py @@ -261,7 +261,7 @@ def _l10n_ro_post_invoice_step_1(self, invoice, attachment): } if ( invoice.journal_id.l10n_ro_partner_id - and invoice.journal_id.l10n_ro_sequence_type == "autoinv2" + and invoice.journal_id.l10n_ro_sequence_type != "invoice" ): params.update({"autofactura": "DA"}) res = self._l10n_ro_anaf_call("/upload", anaf_config, params, attachment.raw) diff --git a/l10n_ro_account_edi_ubl/models/account_edi_xml_cius_ro.py b/l10n_ro_account_edi_ubl/models/account_edi_xml_cius_ro.py index 845f3b88c..7eb249c5c 100644 --- a/l10n_ro_account_edi_ubl/models/account_edi_xml_cius_ro.py +++ b/l10n_ro_account_edi_ubl/models/account_edi_xml_cius_ro.py @@ -217,10 +217,17 @@ def _export_invoice_vals(self, invoice): if ( invoice.move_type in ("in_invoice", "in_refund") and invoice.journal_id.l10n_ro_sequence_type == "autoinv2" + ) or ( + invoice.journal_id.type == "sale" + and invoice.journal_id.l10n_ro_sequence_type == "autoinv1" ): vals_list["vals"]["invoice_type_code"] = 389 - point_of_sale = self.env["ir.module.module"].search( - [("name", "=", "point_of_sale"), ("state", "=", "installed")], limit=1 + point_of_sale = ( + self.env["ir.module.module"] + .sudo() + .search( + [("name", "=", "point_of_sale"), ("state", "=", "installed")], limit=1 + ) ) if point_of_sale: if invoice.pos_order_ids: diff --git a/l10n_ro_stock_account_date/__manifest__.py b/l10n_ro_stock_account_date/__manifest__.py index 244a7468e..502c752c2 100644 --- a/l10n_ro_stock_account_date/__manifest__.py +++ b/l10n_ro_stock_account_date/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Stock Accounting Date", - "version": "16.0.1.5.0", + "version": "16.0.1.6.0", "category": "Localization", "summary": "Romania - Stock Accounting Date", "author": "NextERP Romania," "Odoo Community Association (OCA)", diff --git a/l10n_ro_stock_account_date/models/stock_move.py b/l10n_ro_stock_account_date/models/stock_move.py index c045c5b9f..d61761980 100644 --- a/l10n_ro_stock_account_date/models/stock_move.py +++ b/l10n_ro_stock_account_date/models/stock_move.py @@ -43,26 +43,17 @@ def l10n_ro_get_move_date(self): ) if restrict_date_future: last_posting_date = date.today() - if new_date.date() > last_posting_date: + if first_posting_date or last_posting_date: + if not (first_posting_date <= new_date.date() <= last_posting_date): raise UserError( _( "Cannot validate stock move due to date restriction." - "The date must be before %(last_posting_date)s " - ) - % { - "last_posting_date": last_posting_date, - } - ) - self.check_lock_date(self.date) - if first_posting_date: - if not (first_posting_date <= new_date.date()): - raise UserError( - _( - "Cannot validate stock move due to date restriction." - "The date must be after %(first_posting_date)s" + "The date must be between %(first_posting_date)s and " + "%(last_posting_date)s" ) % { "first_posting_date": first_posting_date, + "last_posting_date": last_posting_date, } ) self.check_lock_date(self.date) @@ -83,6 +74,13 @@ def _trigger_assign(self): def _get_price_unit(self): # Update price unit for purchases in different currencies with the # reception date. + mrp = ( + self.env["ir.module.module"] + .sudo() + .search([("name", "=", "purchase_mrp"), ("state", "=", "installed")]) + ) + if mrp: + return super()._get_price_unit() if self.is_l10n_ro_record: if ( self.origin_returned_move_id diff --git a/l10n_ro_stock_price_difference/README.rst b/l10n_ro_stock_price_difference/README.rst index fa303339f..a76dc8dfd 100644 --- a/l10n_ro_stock_price_difference/README.rst +++ b/l10n_ro_stock_price_difference/README.rst @@ -29,6 +29,7 @@ Romania - Stock Accounting Price Difference |badge1| |badge2| |badge3| |badge4| |badge5| The module is managing price diferences between invoices and receptions. It will create a landed cost with a "Price Difference" product available in the configuration. +***The price diference does not apply to receptions of products with a BOM (Bill of Materials).*** **Table of contents** diff --git a/l10n_ro_stock_price_difference/readme/DESCRIPTION.rst b/l10n_ro_stock_price_difference/readme/DESCRIPTION.rst index e99eedf56..83fe7c2a9 100644 --- a/l10n_ro_stock_price_difference/readme/DESCRIPTION.rst +++ b/l10n_ro_stock_price_difference/readme/DESCRIPTION.rst @@ -1 +1,2 @@ The module is managing price diferences between invoices and receptions. It will create a landed cost with a "Price Difference" product available in the configuration. +***The price diference does not apply to receptions of products with a BOM (Bill of Materials).*** diff --git a/l10n_ro_stock_price_difference/static/description/index.html b/l10n_ro_stock_price_difference/static/description/index.html index 87a6254d7..288431d0a 100644 --- a/l10n_ro_stock_price_difference/static/description/index.html +++ b/l10n_ro_stock_price_difference/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,7 +370,8 @@

Romania - Stock Accounting Price Difference

!! source digest: sha256:4cbd59a27b9540285649c22b08016d7f702b479a69ba6a403b698ddee2268749 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Mature License: AGPL-3 OCA/l10n-romania Translate me on Weblate Try me on Runboat

-

The module is managing price diferences between invoices and receptions. It will create a landed cost with a “Price Difference” product available in the configuration.

+

The module is managing price diferences between invoices and receptions. It will create a landed cost with a “Price Difference” product available in the configuration. +*The price diference does not apply to receptions of products with a BOM (Bill of Materials).*

Table of contents