Finish port of intrastat_product_type
This commit is contained in:
@@ -20,8 +20,7 @@ This module has been written by Alexis de Lattre from Akretion <alexis.delattre@
|
||||
""",
|
||||
'author': 'Akretion',
|
||||
'website': 'http://www.akretion.com',
|
||||
# 'depends': ['intrastat_product', 'l10n_fr_intrastat_service'],
|
||||
'depends': ['intrastat_product'],
|
||||
'depends': ['intrastat_product', 'l10n_fr_intrastat_service'],
|
||||
'data': ['product_view.xml'],
|
||||
'post_init_hook': 'set_intrastat_type_on_products',
|
||||
'installable': True,
|
||||
|
||||
@@ -60,14 +60,14 @@ class ProductTemplate(models.Model):
|
||||
return super(ProductTemplate, self).create(vals)
|
||||
|
||||
|
||||
#class L10nFrIntrastatServiceDeclaration(models.Model):
|
||||
# _inherit = "l10n.fr.intrastat.service.declaration"
|
||||
class L10nFrIntrastatServiceDeclaration(models.Model):
|
||||
_inherit = "l10n.fr.intrastat.service.declaration"
|
||||
|
||||
# def _is_service(self, invoice_line):
|
||||
# if invoice_line.product_id.intrastat_type == 'service':
|
||||
# return True
|
||||
# else:
|
||||
# return False
|
||||
def _is_service(self, invoice_line):
|
||||
if invoice_line.product_id.intrastat_type == 'service':
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
class IntrastatProductDeclaration(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user