[IMP] rma_product_cores: Add hook to prevent rma invoicing due to upgrade.

This commit is contained in:
Jared Kipe
2020-09-11 14:24:39 -07:00
parent 1a02f43f51
commit 90d0e48951
3 changed files with 7 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
{ {
'name': 'RMA - Product Cores', 'name': 'RMA - Product Cores',
'author': 'Hibou Corp. <hello@hibou.io>', 'author': 'Hibou Corp. <hello@hibou.io>',
'version': '13.0.1.0.0', 'version': '13.0.1.0.1',
'license': 'OPL-1', 'license': 'OPL-1',
'category': 'Tools', 'category': 'Tools',
'summary': 'RMA Product Cores', 'summary': 'RMA Product Cores',

View File

@@ -120,6 +120,10 @@ class RMA(models.Model):
return res2 return res2
return res return res
def _invoice_values_product_core_sale(self):
# the RMA invoice API will not be used as invoicing will happen at the SO level
return False
def _get_dirty_core_from_service_line(self, line): def _get_dirty_core_from_service_line(self, line):
original_product_line = line.core_line_id original_product_line = line.core_line_id
return original_product_line.product_id.product_core_id return original_product_line.product_id.product_core_id

View File

@@ -42,8 +42,8 @@
<hr/> <hr/>
<div class="row"> <div class="row">
<div class="col-lg-1 text-center"> <div class="col-lg-1 text-center">
<img t-attf-src="/web/image/product.product/#{product.id}/image_64" <img class="mr4 float-left o_portal_product_img" t-if="product.image_128" t-att-src="image_data_uri(product.image_128)" alt="Product Image" width="64"/>
width="64" alt="Product image"></img> <img class="mr4 float-left o_portal_product_img" t-if="not product.image_128" src="/web/static/src/img/placeholder.png" alt="Product Image" width="64"/>
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<span t-esc="product.name"/> <span t-esc="product.name"/>