Browse Source

[FIX] partner_financial_risk: risk table layout

pull/470/head
David Vidal 7 years ago
committed by David
parent
commit
89fab735d4
  1. 2
      partner_financial_risk/README.rst
  2. 1
      partner_financial_risk/__manifest__.py
  3. 8
      partner_financial_risk/static/src/less/partner_financial_risk_table.less
  4. 10
      partner_financial_risk/templates/assets.xml
  5. 2
      partner_financial_risk/tests/test_partner_financial_risk.py
  6. 40
      partner_financial_risk/views/res_partner_view.xml

2
partner_financial_risk/README.rst

@ -62,6 +62,8 @@ Contributors
* Carlos Dauden <carlos.dauden@tecnativa.com>
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Jairo Llopis <jairo.llopis@tecnativa.com>
* David Vidal <david.vidal@tecnativa.com>
* Agathe Mollé <agathe.molle@savoirfairelinux.com>
Do not contact contributors directly about support or help with technical issues.

1
partner_financial_risk/__manifest__.py

@ -18,6 +18,7 @@
'views/res_config_view.xml',
'views/res_partner_view.xml',
'wizard/partner_risk_exceeded_view.xml',
'templates/assets.xml',
],
'installable': True,
}

8
partner_financial_risk/static/src/less/partner_financial_risk_table.less

@ -0,0 +1,8 @@
.oe_left_padding_15 {
padding-left: 15px;
}
label.oe_label_to_left {
float: left;
text-align: left !important;
}

10
partner_financial_risk/templates/assets.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="assets_common" inherit_id="web.assets_common">
<xpath expr="." position="inside">
<link rel="stylesheet" type="text/css" href="/partner_financial_risk/static/src/less/partner_financial_risk_table.less" />
</xpath>
</template>
</odoo>

2
partner_financial_risk/tests/test_partner_financial_risk.py

@ -146,5 +146,5 @@ class TestPartnerFinancialRisk(SavepointCase):
def test_recompute_newid(self):
"""Computing risk shouldn't fail if record is a NewId."""
new = self.env['res.partner'].new({'customer': True})
new = self.env["res.partner"].new({"customer": True})
new._compute_risk_invoice()

40
partner_financial_risk/views/res_partner_view.xml

@ -14,38 +14,38 @@
<page name="sales_purchases" position="after">
<page name="financial_risk" string="Financial Risk" attrs="{'invisible': [('customer','=',False)]}">
<group name="risk_general" col="3">
<group string="General Limits" name="risk_include" col="1" colspan="2">
<group col="3" class="oe_subtotal_footer">
<group string="General Limits" name="risk_include" class="o_group_col_6">
<group col="3" class="oe_subtotal_footer" style="float: left !important;">
<field name="risk_invoice_draft_include"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
<field name="risk_invoice_draft" nolabel="1"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_invoice_draft" nolabel="1" class="oe_left_padding_15"/>
<field name="risk_invoice_open_include"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
<field name="risk_invoice_open" nolabel="1"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_invoice_open" nolabel="1" class="oe_left_padding_15"/>
<field name="risk_invoice_unpaid_include"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
<field name="risk_invoice_unpaid" nolabel="1"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_invoice_unpaid" nolabel="1" class="oe_left_padding_15"/>
<field name="risk_account_amount_include"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
<field name="risk_account_amount" nolabel="1"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_account_amount" nolabel="1" class="oe_left_padding_15"/>
<field name="risk_account_amount_unpaid_include"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
<field name="risk_account_amount_unpaid" nolabel="1"/>
<field name="risk_total" colspan="3" class="oe_subtotal_footer_separator"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_account_amount_unpaid" nolabel="1" class="oe_left_padding_15"/>
<field name="risk_total" colspan="3" class="oe_subtotal_footer_separator oe_label_to_left"/>
</group>
</group>
<group string="Specific Limits" name="risk_limits" col="2">
<group class="oe_subtotal_footer">
<group string="Specific Limits" name="risk_limits" class="o_group_col_6">
<group class="oe_subtotal_footer" style="float: left !important;">
<field name="risk_invoice_draft_limit"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_invoice_open_limit"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_invoice_unpaid_limit"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_account_amount_limit"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_account_amount_unpaid_limit"
attrs="{'readonly': [('risk_allow_edit', '=', False)]}"/>
attrs="{'readonly': [('risk_allow_edit', '=', False)]}" class="oe_label_to_left"/>
<field name="risk_allow_edit" invisible="1"/>
</group>
</group>

Loading…
Cancel
Save