Explorar o código

Ajustes varios

deisy %!s(int64=5) %!d(string=hai) anos
pai
achega
70b5fa4c3c

+ 10 - 3
models/import_cost_calculation.py

@@ -11,8 +11,8 @@ DATE_FORMAT = '%Y-%m-%d'
 class import_purchase_line(models.Model):
     _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_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)
@@ -21,7 +21,7 @@ class import_expense_line(models.Model):
     _name = 'import.expense.line'
 
     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_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)
@@ -41,6 +41,13 @@ class import_cost(models.Model):
         ], 'Estado', readonly=True, select=True, default="draft")
     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')
+    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
     def _get_amount(self):

BIN=BIN
models/import_cost_calculation.pyc


+ 13 - 3
views/import_cost_calculation.xml

@@ -17,9 +17,19 @@
               <field name="name" class="oe_inline" readonly="1"/>
             </h1>
             <group>
-              <field name="date"/>
-              <field name="created_by" readonly="1"/>
-              <field name="approved_by" readonly="1"/>
+              <group>
+                  <field name="date"/>
+                  <field name="customs_broker"/>
+                  <field name="customs_clearance"/>
+                  <field name="note"/>
+              </group>
+              <group>
+                <field name="product_qty"/>
+                <field name="currency_id"/>
+                <field name="weight" readonly="1"/>
+                <field name="created_by" readonly="1"/>
+                <field name="approved_by" readonly="1"/>
+              </group>
             </group>