Skip to content

Commit

Permalink
Merge pull request #107 from dhongu/14.0-factura
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
dhongu authored Nov 17, 2023
2 parents 372c46e + 5ce5c23 commit b33a05c
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 124 deletions.
6 changes: 3 additions & 3 deletions l10n_ro_edi_ubl/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=================
Romania - EDI UBL
=================
==========================
Obsolete Romania - EDI UBL
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand Down
6 changes: 3 additions & 3 deletions l10n_ro_edi_ubl/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Romania - EDI UBL</title>
<title>Obsolete Romania - EDI UBL</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,8 +360,8 @@
</style>
</head>
<body>
<div class="document" id="romania-edi-ubl">
<h1 class="title">Romania - EDI UBL</h1>
<div class="document" id="obsolete-romania-edi-ubl">
<h1 class="title">Obsolete Romania - EDI UBL</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand Down
1 change: 1 addition & 0 deletions l10n_ro_invoice_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"views/account_voucher_report.xml",
"views/account_bank_statement_view.xml",
"views/statement_report.xml",
"views/res_config_view.xml",
# 'views/res_partner_view.xml',
],
}
1 change: 0 additions & 1 deletion l10n_ro_invoice_report/report/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def _with_discount(self, invoice):
return res

def _get_pickings(self, invoice):

if not self.env["ir.module.module"].sudo().search([("name", "=", "stock"), ("state", "=", "installed")]):
return False

Expand Down
16 changes: 10 additions & 6 deletions l10n_ro_invoice_report/views/invoice_report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
<div id="address" class="address row">
<div name="information_block" class="col-6">
<div>
<strong t-if="o.move_type in ['out_invoice', 'out_refund']">Supplier
<strong t-if="o.move_type in ['out_invoice', 'out_refund']">Supplier:
</strong>
<strong t-if="o.move_type in ['in_invoice', 'in_refund']">Customer
<strong t-if="o.move_type in ['in_invoice', 'in_refund']">Customer:
</strong>
</div>
<strong t-field="res_company.partner_id.name" />
Expand All @@ -60,9 +60,9 @@
</div>
<div class="col-5 offset-1">
<div>
<strong t-if="o.move_type in ['out_invoice', 'out_refund']">Customer
<strong t-if="o.move_type in ['out_invoice', 'out_refund']">Customer:
</strong>
<strong t-if="o.move_type in ['in_invoice', 'in_refund']">Supplier
<strong t-if="o.move_type in ['in_invoice', 'in_refund']">Supplier:
</strong>
</div>
<div id='partner_name'>
Expand Down Expand Up @@ -207,12 +207,16 @@
<t t-if="o.move_type == 'out_invoice'">
<strong>Deliveries:</strong>
</t>
<p class="m-0" t-foreach="pickings" t-as="d">
<span class="m-0" t-foreach="pickings" t-as="d">
<span t-field="d.name" />
</p>
</span>
</div>
</xpath>

<xpath expr="//h2/span[4]" position="after">
<span t-if="o.move_type == 'out_refund' and o.state == 'cancel'">Cancelled</span>
</xpath>


<xpath expr="//table[@name='invoice_line_table']" position="replace">
<t t-set="with_discount_distinct" t-value="get_discount" />
Expand Down
39 changes: 10 additions & 29 deletions l10n_ro_journal_register/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,22 @@
Romania - Journal Register
==========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9713c6eb50a702bd0abbcf93448e3254000b886d6aca4504943b566f3bc81e4b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--romania-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-romania/tree/14.0/l10n_ro_journal_register
:alt: OCA/l10n-romania
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-romania-14-0/l10n-romania-14-0-l10n_ro_journal_register
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-romania&target_branch=14.0
:alt: Try me on Runboat
.. |badge3| image:: https://img.shields.io/badge/github-dhongu%2Fl10n--romania-lightgray.png?logo=github
:target: https://github.com/dhongu/l10n-romania/tree/14.0/l10n_ro_journal_register
:alt: dhongu/l10n-romania

|badge1| |badge2| |badge3| |badge4| |badge5|
|badge1| |badge2| |badge3|


**Table of contents**
Expand All @@ -48,10 +39,10 @@ To install this module, you need to:
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-romania/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/dhongu/l10n-romania/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-romania/issues/new?body=module:%20l10n_ro_journal_register%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_journal_register%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -76,16 +67,6 @@ Do not contact contributors directly about support or help with technical issues
Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

This module is part of the `OCA/l10n-romania <https://github.com/OCA/l10n-romania/tree/14.0/l10n_ro_journal_register>`_ project on GitHub.
This module is part of the `dhongu/l10n-romania <https://github.com/dhongu/l10n-romania/tree/14.0/l10n_ro_journal_register>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
You are welcome to contribute.
20 changes: 5 additions & 15 deletions l10n_ro_journal_register/report/journal_register_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class JournalRegisterReport(models.TransientModel):
_name = "l10n.ro.journal.register.report"
_description = "JournalRegisterReport"

date_from = fields.Date(
string="Start Date", required=True, default=fields.Date.today
)
date_from = fields.Date(string="Start Date", required=True, default=fields.Date.today)
date_to = fields.Date(string="End Date", required=True, default=fields.Date.today)

in_red = fields.Boolean()
Expand Down Expand Up @@ -168,9 +166,7 @@ def extract_invoice_in(self, invoice_in_ids):
value_d = line.debit
value_c = line.credit

cont_d, cont_c, value_d, value_c = self.fix_debit_credit(
cont_d, cont_c, value_d, value_c, in_red
)
cont_d, cont_c, value_d, value_c = self.fix_debit_credit(cont_d, cont_c, value_d, value_c, in_red)

report_line["debit_account_id"] = cont_d.id
report_line["credit_account_id"] = cont_c.id
Expand Down Expand Up @@ -220,9 +216,7 @@ def extract_invoice_out(self, invoice_out_ids):
value_d = line.debit
value_c = line.credit

cont_d, cont_c, value_d, value_c = self.fix_debit_credit(
cont_d, cont_c, value_d, value_c, in_red
)
cont_d, cont_c, value_d, value_c = self.fix_debit_credit(cont_d, cont_c, value_d, value_c, in_red)

report_line["debit_account_id"] = cont_d.id
report_line["credit_account_id"] = cont_c.id
Expand Down Expand Up @@ -254,9 +248,7 @@ def extract_account_move(self, account_move_ids):
# este necesar sa fe instalat modulul l10n_ro_stock_account
move_type = svl.l10n_ro_valued_type

if (
not move_type
): # evaluari de stoc netratate prin l10n_ro_stock_account
if not move_type: # evaluari de stoc netratate prin l10n_ro_stock_account
move_type = move.move_type

if move_type == "entry" and "POSS" in move.name:
Expand Down Expand Up @@ -314,9 +306,7 @@ def extract_account_move(self, account_move_ids):
if not self.in_red:
in_red = False

cont_d, cont_c, value_d, value_c = self.fix_debit_credit(
cont_d, cont_c, value_d, value_c, in_red
)
cont_d, cont_c, value_d, value_c = self.fix_debit_credit(cont_d, cont_c, value_d, value_c, in_red)

report_line["debit_account_id"] = cont_d.id
report_line["credit_account_id"] = cont_c.id
Expand Down
13 changes: 2 additions & 11 deletions l10n_ro_journal_register/report/journal_register_report_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@
class="oe_inline"
options="{'related_end_date': 'date_to'}"
/>
<i
class="fa fa-long-arrow-right mx-2"
aria-label="Arrow icon"
title="Arrow"
/>
<i class="fa fa-long-arrow-right mx-2" aria-label="Arrow icon" title="Arrow" />
<field
name="date_to"
widget="daterange"
Expand All @@ -39,12 +35,7 @@
</group>

<footer>
<button
name="button_show"
string="_Apply"
type="object"
class="oe_highlight"
/>
<button name="button_show" string="_Apply" type="object" class="oe_highlight" />
or
<button string="_Cancel" class="oe_link" special="cancel" />
</footer>
Expand Down
51 changes: 22 additions & 29 deletions l10n_ro_journal_register/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Romania - Journal Register</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

Expand Down Expand Up @@ -366,25 +366,23 @@ <h1 class="title">Romania - Journal Register</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9713c6eb50a702bd0abbcf93448e3254000b886d6aca4504943b566f3bc81e4b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.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/14.0/l10n_ro_journal_register"><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-14-0/l10n-romania-14-0-l10n_ro_journal_register"><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=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/dhongu/l10n-romania/tree/14.0/l10n_ro_journal_register"><img alt="dhongu/l10n-romania" src="https://img.shields.io/badge/github-dhongu%2Fl10n--romania-lightgray.png?logo=github" /></a></p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
<li><a class="reference internal" href="#installation" id="id1">Installation</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<h1><a class="toc-backref" href="#id1">Installation</a></h1>
<p>To install this module, you need to:</p>
<ul class="simple">
<li>clone the branch 14.0 of the repository <a class="reference external" href="https://github.com/OCA/l10n-romania">https://github.com/OCA/l10n-romania</a></li>
Expand All @@ -395,23 +393,23 @@ <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-romania/issues">GitHub Issues</a>.
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/dhongu/l10n-romania/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/l10n-romania/issues/new?body=module:%20l10n_ro_journal_register%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/dhongu/l10n-romania/issues/new?body=module:%20l10n_ro_journal_register%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
<ul class="simple">
<li>Terrabit</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.terrabit.ro">Terrabit</a>:<ul>
<li>Dorin Hongu &lt;<a class="reference external" href="mailto:dhongu&#64;gmail.com">dhongu&#64;gmail.com</a>&gt;</li>
Expand All @@ -421,14 +419,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">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>
<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>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-romania/tree/14.0/l10n_ro_journal_register">OCA/l10n-romania</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/dhongu/l10n-romania/tree/14.0/l10n_ro_journal_register">dhongu/l10n-romania</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit b33a05c

Please sign in to comment.