Robin Keunen
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
11 additions and
3 deletions
-
easy_my_coop_loan/demo/coop.xml
-
easy_my_coop_loan/models/loan.py
-
easy_my_coop_loan/views/loan_view.xml
|
|
@ -13,6 +13,7 @@ |
|
|
|
<field name="term_date" eval="datetime.today() + timedelta(days=600)"/> |
|
|
|
<field name="user_id" ref="easy_my_coop.res_users_manager_emc_demo"/> |
|
|
|
<field name="rate">0.03</field> |
|
|
|
<field name="gross_rate">0.4</field> |
|
|
|
<field name="face_value">100</field> |
|
|
|
<field name="minimum_amount">4000</field> |
|
|
|
<field name="maximum_amount">10000</field> |
|
|
|
|
|
@ -33,7 +33,9 @@ class LoanIssue(models.Model): |
|
|
|
loan_start_date = fields.Date(string="Loan start date") |
|
|
|
term_date = fields.Date(string="Term date") |
|
|
|
loan_term = fields.Float(string="Duration of the loan in month") |
|
|
|
rate = fields.Float(string="Interest rate") |
|
|
|
rate = fields.Float(string="Net Interest rate") |
|
|
|
gross_rate = fields.Float(string="Gross Interest rate") |
|
|
|
taxes_rate = fields.Float(string="Taxes on interest", required=True) |
|
|
|
face_value = fields.Monetary( |
|
|
|
string="Facial value", |
|
|
|
currency_field="company_currency_id", |
|
|
@ -100,7 +102,6 @@ class LoanIssue(models.Model): |
|
|
|
by_company = fields.Boolean(string="By company") |
|
|
|
by_individual = fields.Boolean(string="By individuals") |
|
|
|
display_on_website = fields.Boolean(sting="Display on website") |
|
|
|
taxes_rate = fields.Float(string="Taxes on interest", required=True) |
|
|
|
|
|
|
|
@api.multi |
|
|
|
def get_max_amount(self, partner): |
|
|
|
|
|
@ -12,6 +12,7 @@ |
|
|
|
<field name="term_date"/> |
|
|
|
<field name="loan_term"/> |
|
|
|
<field name="rate"/> |
|
|
|
<field name="gross_rate"/> |
|
|
|
<field name="minimum_amount"/> |
|
|
|
<field name="maximum_amount"/> |
|
|
|
<field name="subscribed_amount"/> |
|
|
@ -87,11 +88,16 @@ |
|
|
|
</group> |
|
|
|
<group> |
|
|
|
<field name="user_id" widget="selection"/> |
|
|
|
<label for="rate" string="Interest rate"/> |
|
|
|
<label for="rate" string="Net Interest rate"/> |
|
|
|
<div> |
|
|
|
<field name="rate" class="oe_inline"/> |
|
|
|
<span class="o_form_label oe_inline">%</span> |
|
|
|
</div> |
|
|
|
<label for="gross_rate" string="Gross Interest rate"/> |
|
|
|
<div> |
|
|
|
<field name="gross_rate" class="oe_inline"/> |
|
|
|
<span class="o_form_label oe_inline">%</span> |
|
|
|
</div> |
|
|
|
<label for="taxes_rate" string="Taxes on interest"/> |
|
|
|
<div> |
|
|
|
<field name="taxes_rate" class="oe_inline"/> |
|
|
|