Skip to content

Commit

Permalink
Merge PR #1081 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by feketemihai
  • Loading branch information
OCA-git-bot committed Oct 1, 2024
2 parents 31021db + e9e42ab commit 18bd758
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 23 deletions.
2 changes: 1 addition & 1 deletion l10n_ro_account_edi_ubl/models/account_edi_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 9 additions & 2 deletions l10n_ro_account_edi_ubl/models/account_edi_xml_cius_ro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion l10n_ro_stock_account_date/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
26 changes: 12 additions & 14 deletions l10n_ro_stock_account_date/models/stock_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions l10n_ro_stock_price_difference/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down
1 change: 1 addition & 0 deletions l10n_ro_stock_price_difference/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -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).***
14 changes: 9 additions & 5 deletions l10n_ro_stock_price_difference/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -369,7 +370,8 @@ <h1 class="title">Romania - Stock Accounting Price Difference</h1>
!! source digest: sha256:4cbd59a27b9540285649c22b08016d7f702b479a69ba6a403b698ddee2268749
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-romania/tree/16.0/l10n_ro_stock_price_difference"><img alt="OCA/l10n-romania" src="https://img.shields.io/badge/github-OCA%2Fl10n--romania-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-romania-16-0/l10n-romania-16-0-l10n_ro_stock_price_difference"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-romania&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>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.</p>
<p>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.
<strong>*The price diference does not apply to receptions of products with a BOM (Bill of Materials).*</strong></p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down Expand Up @@ -417,7 +419,9 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down

0 comments on commit 18bd758

Please sign in to comment.