mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
Merge pull request #36 from akretion/8-fix-region
[8.0][FIX] Region on intrastat transaction lines
This commit is contained in:
@@ -376,10 +376,10 @@ class IntrastatProductDeclaration(models.Model):
|
||||
inv_type = inv_line.invoice_id.type
|
||||
if inv_line.move_line_ids:
|
||||
if inv_type in ('in_invoice', 'out_refund'):
|
||||
region = inv_line.move_line_ids[0].location_id.\
|
||||
region = inv_line.move_line_ids[0].location_dest_id.\
|
||||
get_intrastat_region()
|
||||
else:
|
||||
region = inv_line.move_line_ids[0].location_dest_id.\
|
||||
region = inv_line.move_line_ids[0].location_id.\
|
||||
get_intrastat_region()
|
||||
elif inv_type in ('in_invoice', 'in_refund'):
|
||||
po_lines = self.env['purchase.order.line'].search(
|
||||
|
||||
Reference in New Issue
Block a user