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 0b270239e..5ef0fc75e 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 @@ -165,17 +165,16 @@ def _export_invoice_vals(self, invoice): index = 1 vals_list["main_template"] = "account_edi_ubl_cii.ubl_20_Invoice" vals_list["vals"]["invoice_type_code"] = 380 - if ( - invoice.move_type in ("in_invoice", "in_refund") - and invoice.journal_id.l10n_ro_sequence_type == "autoinv2" - ): - vals_list["vals"]["invoice_type_code"] = 389 - point_of_sale = self.env["ir.module.module"].search( + 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: - vals_list["vals"]["invoice_type_code"] = 751 + ) + if point_of_sale: + if invoice.pos_order_ids: + vals_list["vals"]["invoice_type_code"] = 751 if vals_list["vals"].get("credit_note_type_code"): vals_list["vals"].pop("credit_note_type_code") for val in vals_list["vals"]["invoice_line_vals"]: diff --git a/l10n_ro_stock_account_date/models/stock_move.py b/l10n_ro_stock_account_date/models/stock_move.py index 86edde5eb..78e7f92ec 100644 --- a/l10n_ro_stock_account_date/models/stock_move.py +++ b/l10n_ro_stock_account_date/models/stock_move.py @@ -76,6 +76,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 f827b5550..c64b2acb4 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..2bab5a22d 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).*** \ No newline at end of file diff --git a/l10n_ro_stock_price_difference/static/description/index.html b/l10n_ro_stock_price_difference/static/description/index.html index fcb309ae3..64c3c0de8 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:a7527d6caf2b01e02089446b7d78912245a9d13e462b6548164a6ad625b36783 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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