Skip to content

Commit

Permalink
[IMP]sale_exception_credit_limit: Hides default credit limit
Browse files Browse the repository at this point in the history
closes #656

Signed-off-by: matiasperalta1 <mnp@adhoc.com.ar>
  • Loading branch information
jok-adhoc authored and matiasperalta1 committed Apr 25, 2023
1 parent edf3e3d commit 35f43dc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sale_exception_credit_limit/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Sale Exception Credit Limit',
'version': "16.0.1.0.0",
'version': "16.0.1.1.0",
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand All @@ -31,6 +31,7 @@
'security/sale_exception_credit_limit_security.xml',
'data/exception_rule_data.xml',
'views/res_partner_views.xml',
'views/res_config_settings_views.xml',
],
'demo': [
'demo/res_partner_demo.xml'
Expand Down
18 changes: 18 additions & 0 deletions sale_exception_credit_limit/views/res_config_settings_views.xml
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.sale_exception_credit_limit</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="40"/>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<!-- Ocultamos default de sale_exception por comportamiento no esperado:
Si seteamos un valor x en default, siempre que esté este seteado en el partner
se inactiva el credit limit. Ocultamos para que quede siempre en 0 y asi replica
lo que hacemos en 15.0 -->
<xpath expr="//field[@name='account_default_credit_limit']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
</odoo>

0 comments on commit 35f43dc

Please sign in to comment.