Browse Source

[FIX] emc_taxshelter_report: Line ending

pull/68/head
Rémy Taymans 5 years ago
parent
commit
b05064d312
  1. 2
      easy_my_coop_taxshelter_report/__manifest__.py
  2. 1
      easy_my_coop_taxshelter_report/data/mail_template_data.xml
  3. 5
      easy_my_coop_taxshelter_report/models/mail_template.py
  4. 12
      easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py
  5. 1
      easy_my_coop_taxshelter_report/reports/tax_shelter_report.xml
  6. 2
      easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

2
easy_my_coop_taxshelter_report/__manifest__.py

@ -21,7 +21,7 @@
{ {
# todo check ir model access # todo check ir model access
"name": "Easy My Coop tax shelter report", "name": "Easy My Coop tax shelter report",
"version": "12.0.1.0.0",
"version": "12.0.1.0.1",
"depends": ["easy_my_coop"], "depends": ["easy_my_coop"],
"author": "Houssine BAKKALI <houssine@coopiteasy.be>", "author": "Houssine BAKKALI <houssine@coopiteasy.be>",
"category": "Cooperative management", "category": "Cooperative management",

1
easy_my_coop_taxshelter_report/data/mail_template_data.xml

@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<!-- Mail template are declared in a NOUPDATE block <!-- Mail template are declared in a NOUPDATE block
so users can freely customize/delete them --> so users can freely customize/delete them -->

5
easy_my_coop_taxshelter_report/models/mail_template.py

@ -4,11 +4,6 @@ from odoo import api, models
class MailTemplate(models.Model): class MailTemplate(models.Model):
_inherit = "mail.template" _inherit = "mail.template"
# def init(self):
# for template_id in EMAIL_TEMPLATE_IDS:
# mail_template = self.env.ref(template_id)
# mail_template.easy_my_coop = True
@api.multi @api.multi
def send_mail_with_multiple_attachments(self, res_id, def send_mail_with_multiple_attachments(self, res_id,
additional_attachments, additional_attachments,

12
easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py

@ -354,13 +354,19 @@ class TaxShelterCertificateLine(models.Model):
if line.type == 'subscribed' and line.tax_shelter: if line.type == 'subscribed' and line.tax_shelter:
if (line.capital_before_sub < line.capital_limit if (line.capital_before_sub < line.capital_limit
and line.capital_after_sub >= line.capital_limit): and line.capital_after_sub >= line.capital_limit):
line.amount_subscribed_eligible = line.capital_limit - line.capital_before_sub #noqa
line.amount_subscribed_eligible = (
line.capital_limit - line.capital_before_sub
)
elif (line.capital_before_sub < line.capital_limit elif (line.capital_before_sub < line.capital_limit
and line.capital_after_sub <= line.capital_limit): and line.capital_after_sub <= line.capital_limit):
line.amount_subscribed_eligible = line.share_unit_price * line.quantity #noqa
line.amount_subscribed_eligible = (
line.share_unit_price * line.quantity
)
elif line.capital_before_sub >= line.capital_limit: elif line.capital_before_sub >= line.capital_limit:
line.amount_subscribed_eligible = 0 line.amount_subscribed_eligible = 0
if line.type == 'resold': if line.type == 'resold':
line.amount_resold = line.share_unit_price * -(line.quantity) line.amount_resold = line.share_unit_price * -(line.quantity)
if line.type == 'transfered': if line.type == 'transfered':
line.amount_transfered = line.share_unit_price * -(line.quantity) #noqa
line.amount_transfered = (
line.share_unit_price * -(line.quantity)
)

1
easy_my_coop_taxshelter_report/reports/tax_shelter_report.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data noupdate="0"> <data noupdate="0">
<report <report
id="action_tax_shelter_subscription_report" id="action_tax_shelter_subscription_report"

2
easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data>
<menuitem name="Declaration" id="menu_easy_my_coop_main_declaration" parent="easy_my_coop.menu_main_easy_my_coop" sequence="10"/> <menuitem name="Declaration" id="menu_easy_my_coop_main_declaration" parent="easy_my_coop.menu_main_easy_my_coop" sequence="10"/>
<record id="tax_shelter_declaration_form" model="ir.ui.view"> <record id="tax_shelter_declaration_form" model="ir.ui.view">
@ -197,5 +196,4 @@
</record> </record>
<menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_user"/> <menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_user"/>
</data>
</odoo> </odoo>
Loading…
Cancel
Save