Fall 5557: US02
parent
e1253caf51
commit
5dded76140
|
|
@ -28,6 +28,7 @@ class AccountInvoiceLine(models.Model):
|
|||
intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code')
|
||||
lot_id = fields.Many2one(comodel_name='stock.production.lot', string='Lot')
|
||||
weight = fields.Float(string='Gewicht', compute='_compute_weight')
|
||||
hide_intrastat_code = fields.Boolean('ZV', help='Zolltarifnummer verbergen')
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
|
|
@ -131,7 +132,7 @@ class AccountInvoice(models.Model):
|
|||
intrastrat_not_set = False
|
||||
for invoice_line in self.invoice_line_ids:
|
||||
if invoice_line.product_id and invoice_line.product_id.type != 'service':
|
||||
if not invoice_line.intrastat_id:
|
||||
if not invoice_line.intrastat_id and not invoice_line.hide_intrastat_code:
|
||||
info += invoice_line.name + "\n"
|
||||
intrastrat_not_set = True
|
||||
if intrastrat_not_set:
|
||||
|
|
|
|||
|
|
@ -503,6 +503,7 @@ class SaleOrderLine(models.Model):
|
|||
'price_unit': -invoice_lines.price_subtotal * (discount / 100),
|
||||
'uom_id': self.env.ref('product.product_uom_unit').id,
|
||||
'name': 'Händlerrabatt {}%'.format(discount),
|
||||
'hide_intrastat_code': True
|
||||
})
|
||||
del vals['discount']
|
||||
invoice_lines |= self.env['account.invoice.line'].create(vals)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
<xpath expr="//field[@name='invoice_line_ids']/kanban//field[@name='product_id']" position="after">
|
||||
<field name="lot_id"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='invoice_line_ids']/tree//field[@name='invoice_line_tax_ids']" position="before">
|
||||
<field name="hide_intrastat_code"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
</strong>
|
||||
<br/>
|
||||
</t>
|
||||
<span t-if="with_intrastat and invoice_line.intrastat_id">
|
||||
<span t-if="with_intrastat and invoice_line.intrastat_id and not invoice_line.hide_intrastat_code">
|
||||
<strong>Zolltarif Nr.:</strong>
|
||||
<span t-field="invoice_line.intrastat_id"/>
|
||||
<br/>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ class AccountInvoiceLine(models.Model):
|
|||
compute='_compute_price_reduce', required=True, store=True,
|
||||
help='Rabattierter Einzelpreis, inkludiert bereits den Rabatt und ist auf 2 Stellen '
|
||||
'kaufmännisch gerundet.')
|
||||
hide_discount = fields.Boolean(string='RV')
|
||||
hide_discount = fields.Boolean(string='RV', help='Rabatt verbergen')
|
||||
|
||||
@api.multi
|
||||
@api.depends('price_unit', 'discount')
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ from odoo.tools import float_round
|
|||
class SaleOrderLine(models.Model):
|
||||
_inherit = 'sale.order.line'
|
||||
|
||||
hide_discount = fields.Boolean(string='RV')
|
||||
hide_discount = fields.Boolean(string='RV', help='Rabatt verbergen')
|
||||
|
||||
@api.multi
|
||||
@api.depends('product_uom_qty', 'discount', 'price_unit', 'tax_id')
|
||||
|
|
|
|||
Loading…
Reference in New Issue