-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: 16.0
Are you sure you want to change the base?
Conversation
account_oss_report/README.rst
Outdated
:alt: License: GPL-3 | ||
|
||
================== | ||
Account Oss Report |
There was a problem hiding this comment.
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/README.rst
Outdated
Account Oss Report | ||
================== | ||
|
||
Module summary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary is missing.
account_oss_report/__manifest__.py
Outdated
"category": "Accounting", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"depends": ["account", "l10n_eu_oss"], |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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" --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove comment code.
There was a problem hiding this comment.
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.
No description provided.