Skip to content

Commit

Permalink
[ADD] l10n_ar_loyalty: Nuevo modelo para productos de bonificacion
Browse files Browse the repository at this point in the history
Task: 32083
  • Loading branch information
mem-adhoc authored and zaoral committed Jul 31, 2023
1 parent 965f9b4 commit 90e32b5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_ar_loyalty/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions l10n_ar_loyalty/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
'name': 'l10n_ar Loyalty',
'version': "16.0.1.0.0",
'description': '',
'author': 'ADHOC SA',
'depends': [
'l10n_ar',
'loyalty',
],
'data': [
],
'demo': [
],
'installable': True,
'assets': {
},
'license': 'LGPL-3',
}
1 change: 1 addition & 0 deletions l10n_ar_loyalty/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import loyalty_reward
15 changes: 15 additions & 0 deletions l10n_ar_loyalty/models/loyalty_reward.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from odoo import models


class LoyaltyReward(models.Model):
_inherit = 'loyalty.reward'

def _get_discount_product_values(self):
res = super()._get_discount_product_values()
uom_afip_bo = self.env.ref('l10n_ar.product_uom_afip_bo').id
for values in res:
values.update({
'uom_id': uom_afip_bo,
'uom_po_id': uom_afip_bo,
})
return res

0 comments on commit 90e32b5

Please sign in to comment.