|
@@ -12,7 +12,7 @@ class import_purchase_line(models.Model):
|
|
_name = 'import.purchase.line'
|
|
_name = 'import.purchase.line'
|
|
|
|
|
|
import_id = fields.Many2one('import.cost', 'Compras de importación',ondelete='cascade')
|
|
import_id = fields.Many2one('import.cost', 'Compras de importación',ondelete='cascade')
|
|
- purchase_id = fields.Many2one('account.invoice', 'Compras',required=True, domain=[('type', '=', 'in_invoice')])
|
|
|
|
|
|
+ purchase_id = fields.Many2one('account.invoice', 'Compras',required=True)
|
|
purchase_subtotal = fields.Float("Subtotal", related='purchase_id.amount_untaxed', store=True, readonly=True)
|
|
purchase_subtotal = fields.Float("Subtotal", related='purchase_id.amount_untaxed', store=True, readonly=True)
|
|
purchase_taxes = fields.Float("Impuestos", related='purchase_id.amount_tax', store=True, readonly=True)
|
|
purchase_taxes = fields.Float("Impuestos", related='purchase_id.amount_tax', store=True, readonly=True)
|
|
purchase_total = fields.Float("Total", related='purchase_id.amount_total', store=True, readonly=True)
|
|
purchase_total = fields.Float("Total", related='purchase_id.amount_total', store=True, readonly=True)
|
|
@@ -32,7 +32,7 @@ class import_expense_line(models.Model):
|
|
_name = 'import.expense.line'
|
|
_name = 'import.expense.line'
|
|
|
|
|
|
import_id = fields.Many2one('import.cost', 'Gastos de importación',ondelete='cascade')
|
|
import_id = fields.Many2one('import.cost', 'Gastos de importación',ondelete='cascade')
|
|
- expense_id = fields.Many2one('account.invoice', 'Gastos', required=True, domain=[('type', '=', 'in_invoice')])
|
|
|
|
|
|
+ expense_id = fields.Many2one('account.invoice', 'Gastos', required=True)
|
|
expense_subtotal = fields.Float("Subtotal", related='expense_id.amount_untaxed', store=True, readonly=True)
|
|
expense_subtotal = fields.Float("Subtotal", related='expense_id.amount_untaxed', store=True, readonly=True)
|
|
expense_taxes = fields.Float("Impuestos", related='expense_id.amount_tax', store=True, readonly=True)
|
|
expense_taxes = fields.Float("Impuestos", related='expense_id.amount_tax', store=True, readonly=True)
|
|
expense_total = fields.Float("Total", related='expense_id.amount_total', store=True, readonly=True)
|
|
expense_total = fields.Float("Total", related='expense_id.amount_total', store=True, readonly=True)
|