Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] [15.0]account_invoice_date #1166

Closed

Conversation

ikapasi-initos
Copy link

No description provided.

Copy link

@dsolanki-initos dsolanki-initos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review and functional test.
LGTM!

@AaronHForgeFlow
Copy link
Contributor

Commit history is missing. Can you follow the steps described here https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0 ?

@antoniocanovas
Copy link

Is it a migration or a new one?
I can't find it in previous versions...

@ikapasi-initos ikapasi-initos changed the title [MIG] account_invoice_date: Migration to 15.0 [ADD] account_invoice_date: Migration to 15.0 Jun 2, 2022
@AaronHForgeFlow
Copy link
Contributor

If this is a new module, can you please remove the word "migration" from the title here as well? thanks :)

@rafaelbn
Copy link
Member

rafaelbn commented Jun 2, 2022

Hello @ikapasi-initos , I'm curious about why you this this module. Is this a UX button?

#. Go to Invoice > Click Create > Create new invoice.
#. Click on "Confirm" button.
#. Select the date and Click on "Open invoice" button.

@ikapasi-initos ikapasi-initos changed the title [ADD] account_invoice_date: Migration to 15.0 [ADD] [15.0]account_invoice_date Jun 3, 2022
@jans23
Copy link

jans23 commented Jun 15, 2022

Yes, it's a button which allows to choose the invoice date when confirming the invoice. This helps when the company uses "actual taxation" (instead of "imputed taxation") which is not supported by Odoo directly.

@ikapasi-initos
Copy link
Author

ikapasi-initos commented Jul 8, 2022

Hello @dalonsod it would be great if you add reviews here.

Copy link

@dalonsod dalonsod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!
Tested in runboat, AFAIK works. Code review, in general OCA conventions for new addons should be followed and pre-commit run -a command seems to be missing, see comments.

@@ -0,0 +1,6 @@
====================

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be included, it'll be autogenerated later

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @dalonsod when I remove the " README.rst" file and then I've run the "pre-commit run -a" command faced an issue in the " README.rst" file. Please find the attached image.
README_issue

@@ -0,0 +1,106 @@
# Translation of Odoo Server.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this, translations should be added using Weblate

@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These headers are actually unncessary in python files

Comment on lines 3 to 4


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra blank lines.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed extra lines

</button>
</field>
</record>
</odoo>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing empty line at file end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An added empty line.

Comment on lines +5 to +8
import logging

from odoo import api, fields, models

_logger = logging.getLogger(__name__)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import and variable, and api not used

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed unnecessary imports

_description = "Account Voucher Proforma Date"

date = fields.Date(
string="Rechnungsdatum", required=True, default=fields.Date.context_today

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

string attribute in english

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the English string.

# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Invoice Date",
"description": """

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use summary instead of description

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced description with a summary.

""",
"category": "Accounting",
"version": "15.0.1.0.0",
"license": "LGPL-3",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License not coherent with file header

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, we don't have a strong preference. Does OCA prefer any particular license or use by default?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jans23 Both are accepted and it is the author choice. Tipically it is AGPL unless it is a base module that is meant to be used in many other places. I think this module will not be used as dependency for others so APGL is fine.

@ikapasi-initos
Copy link
Author

Hi,@dalonsod I've implemented the feedback you can review it.

@ikapasi-initos
Copy link
Author

Hi, @BT-anieto it would be great if you add reviews here

====================

When an invoice is validated from Draft to Open automatically, the invoice date
is set to current date.If an invoice is validated from Draft to Open manually, a window is displayed to query the invoice date from the user.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is set to current date.If an invoice is validated from Draft to Open manually, a window is displayed to query the invoice date from the user.
is set to current date. If an invoice is validated from Draft to Open manually, a window is displayed to query the invoice date from the user.

Can you put this in the first comment of the PR? this is a new module. People should know what is this about without looking at the code. Thanks.

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review works fine

<group>
<field
name="date"
string="Please enter invoice date (should correspond to payment date)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
string="Please enter invoice date (should correspond to payment date)"
string="Please enter invoice date"

I would avoid the part between brackets, but it is not blocking.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @AaronHForgeFlow I've implemented the changes.

@ikapasi-initos ikapasi-initos force-pushed the 15.0-mig-account_invoice_date branch 4 times, most recently from 8c77dae to 42292df Compare July 29, 2022 10:10
Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the invoice date is already set, I would not show the wizard, just post the invoice as usual:
2022-07-29_12-20

@jans23
Copy link

jans23 commented Jul 29, 2022

if the invoice date is already set, I would not show the wizard, just post the invoice as usual: 2022-07-29_12-20

Good idea. That should also work for our workflow.

@ikapasi-initos
Copy link
Author

@AaronHForgeFlow Could you please review it?

@dsolanki-initos
Copy link

Hi, @max3903 Could you please review this PR?

@dsolanki-initos
Copy link

Could you add at least one unit test that checks the main flow is correct? Thank you!

Sure, I'll add the test case

@dsolanki-initos
Copy link

Could you add at least one unit test that checks the main flow is correct? Thank you!

@AaronHForgeFlow, I've added the test cases kindly review them. Thank you

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review

@dsolanki-initos
Copy link

Hello @dalonsod, In this PR all the changes as per your feedback have been done, Kindly review it.

@dalonsod
Copy link

I still see de.po file. Remove it and I'll approve it. Thanks for your patience!

@jans23
Copy link

jans23 commented Feb 28, 2023

I don't understand. Why should the German translation be removed? Is there an alternative to the de.po file to provide translation?

@dalonsod
Copy link

dalonsod commented Mar 1, 2023

Well, for new modules adding po files is actually allowed (https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#translations). Alternative, as usual, is Weblate once addon is merged.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@AaronHForgeFlow
Copy link
Contributor

LGTM

@jans23
Copy link

jans23 commented Mar 24, 2023

@AaronHForgeFlow This PR is approved and read-to-merge. What can we do to get it merged?

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When an customer invoice or vendor bill is validated from Draft to Open automatically, the invoice/bill date is set to current date. If an invoice/bill is validated from Draft to Open manually, a window is displayed to query the invoice/bill date from the user.

The name of the module IMHO is incorrecto as indicate that you are adding fields date in invoices

@AaronHForgeFlow could you say a better name like account_invoice_date_update or something similar?

Thank you all! 😄

@jans23
Copy link

jans23 commented Mar 31, 2023

We will happily change the module's name to whatever name you agree on.

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 25, 2024
@ozoromo ozoromo force-pushed the 15.0-mig-account_invoice_date branch 2 times, most recently from f4235e0 to 6fa1ec5 Compare March 18, 2024 19:52
@ozoromo ozoromo force-pushed the 15.0-mig-account_invoice_date branch from 6fa1ec5 to 044d38e Compare March 18, 2024 20:11
* Modified account_invoice_date/models/account_move.py so that a name is always set

* Changed the way name is set in order to work with tranlations
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label May 5, 2024
Copy link

github-actions bot commented Sep 8, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 8, 2024
@github-actions github-actions bot closed this Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ready to merge stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants