Browse Source

[FIX] emc_taxshelter_report: Line ending

pull/68/head
Rémy Taymans 4 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
"name": "Easy My Coop tax shelter report",
"version": "12.0.1.0.0",
"version": "12.0.1.0.1",
"depends": ["easy_my_coop"],
"author": "Houssine BAKKALI <houssine@coopiteasy.be>",
"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>
<!-- Mail template are declared in a NOUPDATE block
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):
_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
def send_mail_with_multiple_attachments(self, res_id,
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.capital_before_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
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:
line.amount_subscribed_eligible = 0
if line.type == 'resold':
line.amount_resold = line.share_unit_price * -(line.quantity)
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"?>
<odoo>
<data noupdate="0">
<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"?>
<odoo>
<data>
<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">
@ -197,5 +196,4 @@
</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"/>
</data>
</odoo>
Loading…
Cancel
Save