|
@@ -11,8 +11,8 @@ DATE_FORMAT = '%Y-%m-%d'
|
|
class import_purchase_line(models.Model):
|
|
class import_purchase_line(models.Model):
|
|
_name = 'import.purchase.line'
|
|
_name = 'import.purchase.line'
|
|
|
|
|
|
- import_id = fields.Many2one('import.cost', 'Gastos de importación',ondelete='cascade')
|
|
|
|
- purchase_id = fields.Many2one('account.invoice', 'Gastos de importación',required=True)
|
|
|
|
|
|
+ import_id = fields.Many2one('import.cost', 'Compras de importación',ondelete='cascade')
|
|
|
|
+ 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)
|
|
@@ -21,7 +21,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 de importación', required=True)
|
|
|
|
|
|
+ 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)
|
|
@@ -41,6 +41,13 @@ class import_cost(models.Model):
|
|
], 'Estado', readonly=True, select=True, default="draft")
|
|
], 'Estado', readonly=True, select=True, default="draft")
|
|
created_by = fields.Many2one('res.users', 'Creado por', default=lambda self: self.env.user.id, readonly=True)
|
|
created_by = fields.Many2one('res.users', 'Creado por', default=lambda self: self.env.user.id, readonly=True)
|
|
approved_by = fields.Many2one('res.users', 'Aprobado por')
|
|
approved_by = fields.Many2one('res.users', 'Aprobado por')
|
|
|
|
+ customs_broker = fields.Many2one('res.partner', 'Despachante')
|
|
|
|
+ customs_clearance = fields.Char('Despacho Nro')
|
|
|
|
+ product_qty = fields.Float('Cantidad de productos')
|
|
|
|
+ note = fields.Char('Observación')
|
|
|
|
+ currency_id = fields.Many2one('res.currency', 'Moneda')
|
|
|
|
+ weight = fields.Float('Peso')
|
|
|
|
+
|
|
|
|
|
|
@api.one
|
|
@api.one
|
|
def _get_amount(self):
|
|
def _get_amount(self):
|