-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #1018 Signed-off-by: Virginia Bonservizi <[email protected]>
- Loading branch information
Showing
50 changed files
with
1,070 additions
and
957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
{ | ||
'name': 'Argentinean Withholding Ratio', | ||
'version': "17.0.1.0.0", | ||
'category': 'Localization/Argentina', | ||
'sequence': 14, | ||
'author': 'ADHOC SA', | ||
'website': 'www.adhoc.com.ar', | ||
'license': 'AGPL-3', | ||
'summary': '', | ||
'depends': [ | ||
'l10n_ar_withholding_ux', | ||
"name": "Argentinean Withholding Ratio", | ||
"version": "17.0.1.0.0", | ||
"category": "Localization/Argentina", | ||
"sequence": 14, | ||
"author": "ADHOC SA", | ||
"website": "www.adhoc.com.ar", | ||
"license": "AGPL-3", | ||
"summary": "", | ||
"depends": [ | ||
"l10n_ar_withholding_ux", | ||
], | ||
'data': [ | ||
"data": [ | ||
#'views/account_tax_view.xml', | ||
], | ||
'demo': [ | ||
], | ||
'installable': False, | ||
'auto_install': False, | ||
'application': False, | ||
"demo": [], | ||
"installable": False, | ||
"auto_install": False, | ||
"application": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
from odoo import fields, models, api, _ | ||
from odoo import _, api, fields, models | ||
from odoo.exceptions import ValidationError | ||
|
||
|
||
class AccountTax(models.Model): | ||
_inherit = 'account.tax' | ||
_inherit = "account.tax" | ||
|
||
ratio = fields.Float(default=100.00, help="Ratio to apply to tax base amount.") | ||
|
||
@api.constrains('ratio') | ||
@api.constrains("ratio") | ||
def _check_line_ids_percent(self): | ||
""" Check that the total percent is not bigger than 100.0 """ | ||
"""Check that the total percent is not bigger than 100.0""" | ||
for tax in self: | ||
if not tax.ratio or tax.ratio < 0.0 or tax.ratio > 100.0: | ||
raise ValidationError(_('The total percentage (%s) should be higher than 0 and less or equal to 100.', tax.ratio)) | ||
raise ValidationError( | ||
_("The total percentage (%s) should be higher than 0 and less or equal to 100.", tax.ratio) | ||
) | ||
|
||
def get_withholding_vals(self, payment): | ||
vals = super().get_withholding_vals(payment) | ||
if self.withholding_type == 'partner_tax' and self.ratio != 100: | ||
vals['withholdable_base_amount'] *= self.ratio / 100 | ||
vals['period_withholding_amount'] *= self.ratio / 100 | ||
if self.withholding_type == "partner_tax" and self.ratio != 100: | ||
vals["withholdable_base_amount"] *= self.ratio / 100 | ||
vals["period_withholding_amount"] *= self.ratio / 100 | ||
return vals | ||
|
||
def _compute_amount( | ||
self, base_amount, price_unit, quantity, product, partner=None, fixed_multiplicator=1): | ||
if self.amount_type == 'partner_tax' and self.ratio != 100: | ||
date = self._context.get('invoice_date') or fields.Date.context_today(self) | ||
def _compute_amount(self, base_amount, price_unit, quantity, product, partner=None, fixed_multiplicator=1): | ||
if self.amount_type == "partner_tax" and self.ratio != 100: | ||
date = self._context.get("invoice_date") or fields.Date.context_today(self) | ||
partner = partner and partner.sudo() | ||
return base_amount * self.sudo().get_partner_alicuota_percepcion(partner, date) * self.ratio / 100 | ||
return super()._compute_amount(base_amount, price_unit, quantity, product, partner=partner, fixed_multiplicator=fixed_multiplicator) | ||
return super()._compute_amount( | ||
base_amount, price_unit, quantity, product, partner=partner, fixed_multiplicator=fixed_multiplicator | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,3 @@ | |
</record> | ||
|
||
</odoo> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{ | ||
"name": "Listado de Bancos Argentinos", | ||
'version': "18.0.1.0.0", | ||
'category': 'Localization/Argentina', | ||
'sequence': 14, | ||
'author': 'ADHOC SA', | ||
'license': 'AGPL-3', | ||
'summary': '', | ||
'depends': [ | ||
'base', | ||
'l10n_ar', | ||
"version": "18.0.1.0.0", | ||
"category": "Localization/Argentina", | ||
"sequence": 14, | ||
"author": "ADHOC SA", | ||
"license": "AGPL-3", | ||
"summary": "", | ||
"depends": [ | ||
"base", | ||
"l10n_ar", | ||
], | ||
'data': [ | ||
'data/res_bank.xml', | ||
"data": [ | ||
"data/res_bank.xml", | ||
], | ||
'installable': True, | ||
'auto_install': True, | ||
'application': False, | ||
"installable": True, | ||
"auto_install": True, | ||
"application": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
{ | ||
'name': 'Argentinean Purchase', | ||
'version': "18.0.1.0.0", | ||
'category': 'Localization/Argentina', | ||
'sequence': 14, | ||
'author': 'ADHOC SA', | ||
'website': 'www.adhoc.com.ar', | ||
'license': 'AGPL-3', | ||
'summary': '', | ||
'depends': [ | ||
'purchase', | ||
'l10n_ar', | ||
"name": "Argentinean Purchase", | ||
"version": "18.0.1.0.0", | ||
"category": "Localization/Argentina", | ||
"sequence": 14, | ||
"author": "ADHOC SA", | ||
"website": "www.adhoc.com.ar", | ||
"license": "AGPL-3", | ||
"summary": "", | ||
"depends": [ | ||
"purchase", | ||
"l10n_ar", | ||
], | ||
'external_dependencies': { | ||
}, | ||
'data': [ | ||
'views/purchase_report_templates.xml', | ||
"external_dependencies": {}, | ||
"data": [ | ||
"views/purchase_report_templates.xml", | ||
], | ||
'demo': [ | ||
], | ||
'installable': True, | ||
'auto_install': False, | ||
'application': False, | ||
"demo": [], | ||
"installable": True, | ||
"auto_install": False, | ||
"application": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
{ | ||
'name': 'Argentinian Purchase Stock', | ||
'version': "18.0.1.0.0", | ||
'category': 'Localization/Argentina', | ||
'sequence': 14, | ||
'author': 'ADHOC SA', | ||
'website': 'www.adhoc.com.ar', | ||
'license': 'AGPL-3', | ||
'summary': '', | ||
'depends': [ | ||
'purchase_stock', | ||
'l10n_ar_purchase', | ||
"name": "Argentinian Purchase Stock", | ||
"version": "18.0.1.0.0", | ||
"category": "Localization/Argentina", | ||
"sequence": 14, | ||
"author": "ADHOC SA", | ||
"website": "www.adhoc.com.ar", | ||
"license": "AGPL-3", | ||
"summary": "", | ||
"depends": [ | ||
"purchase_stock", | ||
"l10n_ar_purchase", | ||
], | ||
'external_dependencies': { | ||
}, | ||
'data': [ | ||
'views/purchase_report_templates.xml', | ||
"external_dependencies": {}, | ||
"data": [ | ||
"views/purchase_report_templates.xml", | ||
], | ||
'demo': [ | ||
], | ||
'installable': True, | ||
'auto_install': True, | ||
'application': False, | ||
"demo": [], | ||
"installable": True, | ||
"auto_install": True, | ||
"application": False, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.