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

feat: init the module, define models and views #4

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from

Conversation

laszlokr
Copy link
Contributor

No description provided.

@laszlokr laszlokr requested a review from janikvonrotz October 7, 2024 08:00
@laszlokr laszlokr marked this pull request as ready for review October 7, 2024 08:00
:alt: License: GPL-3

==================
Account Oss Report
Copy link
Contributor

Choose a reason for hiding this comment

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

It is "OSS"

Account Oss Report
==================

Module summary.
Copy link
Contributor

Choose a reason for hiding this comment

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

Summary is missing.

"category": "Accounting",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"depends": ["account", "l10n_eu_oss"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not depend on l10n_eu_oss

@@ -0,0 +1,75 @@
from odoo import api, fields, models

class AccountOssReport(models.Model):
Copy link
Contributor

Choose a reason for hiding this comment

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

"OSS"

# tax_type = fields.Selection()

@api.model
def _get_account_move_data(self, data=None, start_date=False, end_date=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why account_move ?

data = []

# Fetch the tag for "OSS" to use in the domain
oss_tag = self.env['account.account.tag'].search([('name', '=', 'OSS')], limit=1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like this. The tag should be define as an XML ID.

# Fetch move lines that match the criteria
move_lines = self.env['account.move.line'].search(domain)

for line in move_lines:
Copy link
Contributor

Choose a reason for hiding this comment

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

The data should be grouped by country code!

And you have to distinct between tax included and excluded.

<field name="view_mode">tree</field>
</record>

<!-- <menuitem id="menu_account_oss_report" -->
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove comment code.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can get rid of the wizard.

The calculation should be pretty fast, so not wizard might be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants