-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
[MIG][16.0] Migration of datev_export_xml #153
Conversation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-germany-14.0/l10n-germany-14.0-datev_export_xml Translate-URL: https://translation.odoo-community.org/projects/l10n-germany-14-0/l10n-germany-14-0-datev_export_xml/
…dly described exceptions
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: l10n-germany-15.0/l10n-germany-15.0-datev_export_xml Translate-URL: https://translation.odoo-community.org/projects/l10n-germany-15-0/l10n-germany-15-0-datev_export_xml/
don't worry about runboat, that gets stuck sometimes, haven't yet understood the pattern |
@@ -154,7 +150,7 @@ def create_out_invoice(self, customer, start_date, end_date): | |||
"credit": 600.0, | |||
"debit": 0.0, | |||
"account_id": self.account_income.id, | |||
"analytic_account_id": self.analytic_account_it.id, | |||
"analytic_distribution": {self.analytic_account_it.id: 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.
It's only a test but these are in percent which means you have 1% set for all those.
datev_export_xml/views/templates.xml
Outdated
@@ -32,7 +32,7 @@ | |||
|
|||
<accounting_info | |||
t-att-account_no="line.account_id.code or ''" | |||
t-att-cost_category_id="line.analytic_account_id.code or ''" | |||
t-att-cost_category_id="(line.analytic_line_ids[0].account_id.code or '') if line.analytic_line_ids else ''" |
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.
This might be problematic if you actually use an analytic distribution or somebody manually set those (in different order) which would mean that sometimes an analytic account is used and sometimes a different one is used because the lines are ordered mainly by date and id.
Maybe a new doc.datev_analytic_account(line)
function here? To allow an easier hook and custom selection of the "correct" analytic account?
Either way you could shorten it with line.analytic_line_ids[:1].account_id.code or ''
datev_export_xml/views/templates.xml
Outdated
</t> | ||
<t t-else=""> | ||
<t t-set="partner" t-value="doc.company_id.partner_id" /> | ||
</t> |
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's an actual change now. Previously account was always set to the receivable of partner. Now it's not in the t-else
branch. Why do you change the tested logic here when the previous code worked?
Do you have an actual problematic case? Do you find it hard to read with the t-set t-value t-if
in one tag?
See also #126 (comment)
This PR has the |
@tv-openbig I have fixed the visibility of smart buttons. The other fields are visible only if they are set, and they should be set in the settings. As I understand they are just for some overview and I wouldn't change the behavior now during the migration. |
@jsierp fields are there and smart button is also there |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 838491f. Thanks a lot for contributing to OCA. ❤️ |
No description provided.