[tryton-debian-vcs] tryton-modules-sale branch upstream updated. upstream/3.2.1-1-ga2edbda

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Oct 23 12:17:46 UTC 2014


The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale.git;a=commitdiff;h=upstream/3.2.1-1-ga2edbda

commit a2edbda3c686b71f4b460137ade0e309d62af78b
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Oct 21 11:29:19 2014 +0200

    Adding upstream version 3.4.0.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 942ecff..0e1f0be 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 3.2.1 - 2014-09-29
+Version 3.4.0 - 2014-10-20
 * Bug fixes (see mercurial logs for details)
 
 Version 3.2.0 - 2014-04-21
diff --git a/PKG-INFO b/PKG-INFO
index adcefe8..117be1a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_sale
-Version: 3.2.1
+Version: 3.4.0
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.2/
+Download-URL: http://downloads.tryton.org/3.4/
 Description: trytond_sale
         ============
         
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..d686abe
--- /dev/null
+++ b/TODO
@@ -0,0 +1,2 @@
+- Add historization of quotation
+- Cancel draft moves and draft invoice when canceling sale order
diff --git a/invoice.py b/invoice.py
index d2d4c74..bfd5937 100644
--- a/invoice.py
+++ b/invoice.py
@@ -17,10 +17,10 @@ def process_sale(func):
     def wrapper(cls, invoices):
         pool = Pool()
         Sale = pool.get('sale.sale')
-        with Transaction().set_user(0, set_context=True):
+        with Transaction().set_context(_check_access=False):
             sales = [s for i in cls.browse(invoices) for s in i.sales]
         func(cls, invoices)
-        with Transaction().set_user(0, set_context=True):
+        with Transaction().set_context(_check_access=False):
             Sale.process(sales)
     return wrapper
 
@@ -46,10 +46,9 @@ class Invoice:
     @classmethod
     def get_sale_exception_state(cls, invoices, name):
         Sale = Pool().get('sale.sale')
-        with Transaction().set_user(0, set_context=True):
-            sales = Sale.search([
-                    ('invoices', 'in', [i.id for i in invoices]),
-                    ])
+        sales = Sale.search([
+                ('invoices', 'in', [i.id for i in invoices]),
+                ])
 
         recreated = tuple(i for p in sales for i in p.invoices_recreated)
         ignored = tuple(i for p in sales for i in p.invoices_ignored)
@@ -109,10 +108,9 @@ class Invoice:
     @Workflow.transition('draft')
     def draft(cls, invoices):
         Sale = Pool().get('sale.sale')
-        with Transaction().set_user(0, set_context=True):
-            sales = Sale.search([
-                    ('invoices', 'in', [i.id for i in invoices]),
-                    ])
+        sales = Sale.search([
+                ('invoices', 'in', [i.id for i in invoices]),
+                ])
         if sales and any(i.state == 'cancel' for i in invoices):
             cls.raise_user_error('reset_invoice_sale')
 
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index ca79ec9..3606428 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -65,7 +65,7 @@ msgstr "Vendes"
 
 msgctxt "field:product.template,delivery_time:"
 msgid "Delivery Time"
-msgstr "Temps d'enviament"
+msgstr "Termini de lliurament"
 
 msgctxt "field:product.template,salable:"
 msgid "Salable"
@@ -754,7 +754,7 @@ msgstr "Descripció:"
 
 msgctxt "odt:sale.sale:"
 msgid "Draft Sale Order"
-msgstr "Comanda de Venda Esborrany"
+msgstr "Comanda de venda esborrany"
 
 msgctxt "odt:sale.sale:"
 msgid "E-Mail:"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index b8e7746..50c9336 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -76,7 +76,7 @@ msgstr "Verkäufe"
 
 msgctxt "field:product.template,delivery_time:"
 msgid "Delivery Time"
-msgstr "Lieferfrist"
+msgstr "Lieferzeitraum"
 
 msgctxt "field:product.template,salable:"
 msgid "Salable"
diff --git a/locale/ca_ES.po b/locale/es_EC.po
similarity index 73%
copy from locale/ca_ES.po
copy to locale/es_EC.po
index ca79ec9..df48961 100644
--- a/locale/ca_ES.po
+++ b/locale/es_EC.po
@@ -4,84 +4,87 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
 
 msgctxt "error:account.invoice:"
 msgid "You cannot reset to draft an invoice generated by a sale."
-msgstr "No podeu restaurar a esborrany una factura generada per una venda."
+msgstr "No puede restaurar a borrador una factura generada por una venta."
 
 msgctxt "error:sale.line:"
 msgid "Product \"%(product)s\" of sale %(sale)s misses a revenue account."
 msgstr ""
-"Falta el compte a cobrar del producte \"%(product)s\" de la venda %(sale)s."
+"Al producto \"%(product)s\" de la venta \"%(sale)s\" le falta definir una "
+"cuenta de ingresos."
 
 msgctxt "error:sale.line:"
 msgid "Sale \"%(sale)s\" is missing the customer location in line \"%(line)s\"."
 msgstr ""
-"No es troba la localització del client a la línia \"%(line)s\" de la venda "
-"\"%(sale)\"."
+"A la venta \"%(sale)s\" le falta la bodega del cliente en la línea "
+"\"%(line)s\"."
 
 msgctxt "error:sale.line:"
 msgid "Sale \"%(sale)s\" misses an \"account revenue\" default property."
-msgstr "Falta la propietat \"Compte a cobrar\" per defecte de les vendes."
+msgstr ""
+"A la venta \"%(sale)s\" le falta la propiedad por defecto \"Cuenta de "
+"Ingresos\"."
 
 msgctxt "error:sale.sale:"
 msgid "Invalid combination of shipment and invoicing methods on sale \"%s\"."
 msgstr ""
-"La combinació de mètodes d'enviament i facturació a la venda \"%s\" no és "
-"correcta."
+"La combinación de métodos de envío y facturación en la venta \"%s\" no es "
+"válida."
 
 msgctxt "error:sale.sale:"
 msgid ""
 "Invoice and Shipment addresses must be defined for the quotation of sale "
 "\"%s\"."
 msgstr ""
-"L'adreça d'enviament i facturació s'han de definir per al pressupost de la "
-"venda \"%s\"."
+"Las direcciones de facturación y envío se deben definir para la cotización "
+"de venta \"%s\"."
 
 msgctxt "error:sale.sale:"
 msgid "It misses an \"Account Receivable\" on the party \"%s\"."
-msgstr "Falta un \"Compte a cobrar\" al tercer \"%s\"."
+msgstr "Falta definir la \"Cuenta por Cobrar\" del tercero \"%s\"."
 
 msgctxt "error:sale.sale:"
 msgid "Sale \"%s\" must be cancelled before deletion."
-msgstr "Heu de cancel·lar la venda \"%s\" abans de ser eliminat."
+msgstr "La venta \"%s\" debe ser cancelada antes de ser eliminada."
 
 msgctxt "error:sale.sale:"
 msgid "Warehouse must be defined for the quotation of sale \"%s\"."
-msgstr "S'ha de definir el magatzem per al pressupost de la venda \"%s\"."
+msgstr "Se debe definir el depósito para la cotización de la venta \"%s\"."
 
 msgctxt "error:stock.shipment.out.return:"
 msgid "You cannot reset to draft a move generated by a sale."
-msgstr "No podeu restaurar a esborrany un moviment generat per una venda."
+msgstr "No puede restaurar a borrador un movimiento generado por una venta."
 
 msgctxt "error:stock.shipment.out:"
 msgid "You cannot reset to draft a move generated by a sale."
-msgstr "No podeu restaurar a esborrany un moviment generat per una venda."
+msgstr "No puede restaurar a borrador un movimiento generado por una venta."
 
 msgctxt "field:account.invoice,sale_exception_state:"
 msgid "Exception State"
-msgstr "Estat d'excepció"
+msgstr "Estado Excepción"
 
 msgctxt "field:account.invoice,sales:"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "field:product.template,delivery_time:"
 msgid "Delivery Time"
-msgstr "Temps d'enviament"
+msgstr "Tiempo de Entrega"
 
 msgctxt "field:product.template,salable:"
 msgid "Salable"
-msgstr "Pot ser venut"
+msgstr "Vendible"
 
 msgctxt "field:product.template,sale_uom:"
 msgid "Sale UOM"
-msgstr "UdM de venda"
+msgstr "UdM de Venta"
 
 msgctxt "field:sale.configuration,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.configuration,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.configuration,id:"
 msgid "ID"
@@ -89,31 +92,31 @@ msgstr "ID"
 
 msgctxt "field:sale.configuration,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.configuration,sale_invoice_method:"
 msgid "Sale Invoice Method"
-msgstr "Mètode de facturació"
+msgstr "Método de Facturación"
 
 msgctxt "field:sale.configuration,sale_sequence:"
 msgid "Sale Reference Sequence"
-msgstr "Seqüència de numeració vendes"
+msgstr "Secuencia de Pedidos de Venta"
 
 msgctxt "field:sale.configuration,sale_shipment_method:"
 msgid "Sale Shipment Method"
-msgstr "Mètode d'enviament"
+msgstr "Método de Envío"
 
 msgctxt "field:sale.configuration,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.configuration,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.handle.invoice.exception.ask,domain_invoices:"
 msgid "Domain Invoices"
-msgstr "Domini factures"
+msgstr "Dominio de Facturas"
 
 msgctxt "field:sale.handle.invoice.exception.ask,id:"
 msgid "ID"
@@ -121,11 +124,11 @@ msgstr "ID"
 
 msgctxt "field:sale.handle.invoice.exception.ask,recreate_invoices:"
 msgid "Recreate Invoices"
-msgstr "Recrea factures"
+msgstr "Recrear Facturas"
 
 msgctxt "field:sale.handle.shipment.exception.ask,domain_moves:"
 msgid "Domain Moves"
-msgstr "Domini moviments"
+msgstr "Dominio de Movimientos"
 
 msgctxt "field:sale.handle.shipment.exception.ask,id:"
 msgid "ID"
@@ -133,31 +136,31 @@ msgstr "ID"
 
 msgctxt "field:sale.handle.shipment.exception.ask,recreate_moves:"
 msgid "Recreate Moves"
-msgstr "Recrea moviments"
+msgstr "Recrear Movimientos"
 
 msgctxt "field:sale.line,amount:"
 msgid "Amount"
-msgstr "Import"
+msgstr "Subtotal"
 
 msgctxt "field:sale.line,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.line,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.line,delivery_date:"
 msgid "Delivery Date"
-msgstr "Data de lliurament"
+msgstr "Fecha de Entrega"
 
 msgctxt "field:sale.line,description:"
 msgid "Description"
-msgstr "Descripció"
+msgstr "Descripción"
 
 msgctxt "field:sale.line,from_location:"
 msgid "From Location"
-msgstr "Des de la ubicació"
+msgstr "Desde Ubicación"
 
 msgctxt "field:sale.line,id:"
 msgid "ID"
@@ -165,27 +168,27 @@ msgstr "ID"
 
 msgctxt "field:sale.line,invoice_lines:"
 msgid "Invoice Lines"
-msgstr "Línies de factura"
+msgstr "Líneas de Factura"
 
 msgctxt "field:sale.line,move_done:"
 msgid "Moves Done"
-msgstr "Moviments finalitzats"
+msgstr "Movimientos Realizados"
 
 msgctxt "field:sale.line,move_exception:"
 msgid "Moves Exception"
-msgstr "Excepció de moviments"
+msgstr "Excepción de Movimientos"
 
 msgctxt "field:sale.line,moves:"
 msgid "Moves"
-msgstr "Moviments"
+msgstr "Movimientos"
 
 msgctxt "field:sale.line,moves_ignored:"
 msgid "Ignored Moves"
-msgstr "Moviments ignorats"
+msgstr "Movimientos Ignorados"
 
 msgctxt "field:sale.line,moves_recreated:"
 msgid "Recreated Moves"
-msgstr "Moviments recreats"
+msgstr "Movimientos Recreados"
 
 msgctxt "field:sale.line,note:"
 msgid "Note"
@@ -193,71 +196,71 @@ msgstr "Nota"
 
 msgctxt "field:sale.line,product:"
 msgid "Product"
-msgstr "Producte"
+msgstr "Producto"
 
 msgctxt "field:sale.line,product_uom_category:"
 msgid "Product Uom Category"
-msgstr "Categoria UdM del producte"
+msgstr "Categoría UdM de Producto"
 
 msgctxt "field:sale.line,quantity:"
 msgid "Quantity"
-msgstr "Quantitat"
+msgstr "Cantidad"
 
 msgctxt "field:sale.line,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.line,sale:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "field:sale.line,sequence:"
 msgid "Sequence"
-msgstr "Seqüència"
+msgstr "Secuencia"
 
 msgctxt "field:sale.line,taxes:"
 msgid "Taxes"
-msgstr "Impostos"
+msgstr "Impuestos"
 
 msgctxt "field:sale.line,to_location:"
 msgid "To Location"
-msgstr "A la ubicació"
+msgstr "A Bodega"
 
 msgctxt "field:sale.line,type:"
 msgid "Type"
-msgstr "Tipus"
+msgstr "Tipo"
 
 msgctxt "field:sale.line,unit:"
 msgid "Unit"
-msgstr "Unitat"
+msgstr "Unidad"
 
 msgctxt "field:sale.line,unit_digits:"
 msgid "Unit Digits"
-msgstr "Decimals de la unitat"
+msgstr "Decimales de Unidad"
 
 msgctxt "field:sale.line,unit_price:"
 msgid "Unit Price"
-msgstr "Preu unitari"
+msgstr "Precio Unitario"
 
 msgctxt "field:sale.line,warehouse:"
 msgid "Warehouse"
-msgstr "Magatzem"
+msgstr "Depósito"
 
 msgctxt "field:sale.line,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.line,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.line-account.tax,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.line-account.tax,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.line-account.tax,id:"
 msgid "ID"
@@ -265,31 +268,31 @@ msgstr "ID"
 
 msgctxt "field:sale.line-account.tax,line:"
 msgid "Sale Line"
-msgstr "Línia de venta"
+msgstr "Línea de Venta"
 
 msgctxt "field:sale.line-account.tax,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.line-account.tax,tax:"
 msgid "Tax"
-msgstr "Impost"
+msgstr "Impuesto"
 
 msgctxt "field:sale.line-account.tax,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.line-account.tax,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.line-ignored-stock.move,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.line-ignored-stock.move,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.line-ignored-stock.move,id:"
 msgid "ID"
@@ -297,31 +300,31 @@ msgstr "ID"
 
 msgctxt "field:sale.line-ignored-stock.move,move:"
 msgid "Move"
-msgstr "Moviment"
+msgstr "Movimiento"
 
 msgctxt "field:sale.line-ignored-stock.move,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.line-ignored-stock.move,sale_line:"
 msgid "Sale Line"
-msgstr "Línia de venda"
+msgstr "Línea de Venta"
 
 msgctxt "field:sale.line-ignored-stock.move,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.line-ignored-stock.move,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.line-recreated-stock.move,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.line-recreated-stock.move,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.line-recreated-stock.move,id:"
 msgid "ID"
@@ -329,23 +332,23 @@ msgstr "ID"
 
 msgctxt "field:sale.line-recreated-stock.move,move:"
 msgid "Move"
-msgstr "Moviment"
+msgstr "Movimiento"
 
 msgctxt "field:sale.line-recreated-stock.move,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.line-recreated-stock.move,sale_line:"
 msgid "Sale Line"
-msgstr "Línia de venta"
+msgstr "Línea de Venta"
 
 msgctxt "field:sale.line-recreated-stock.move,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.line-recreated-stock.move,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.return_sale.start,id:"
 msgid "ID"
@@ -353,7 +356,7 @@ msgstr "ID"
 
 msgctxt "field:sale.sale,comment:"
 msgid "Comment"
-msgstr "Comentari"
+msgstr "Comentario"
 
 msgctxt "field:sale.sale,company:"
 msgid "Company"
@@ -361,11 +364,11 @@ msgstr "Empresa"
 
 msgctxt "field:sale.sale,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.sale,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.sale,currency:"
 msgid "Currency"
@@ -373,11 +376,11 @@ msgstr "Moneda"
 
 msgctxt "field:sale.sale,currency_digits:"
 msgid "Currency Digits"
-msgstr "Decimals de la moneda"
+msgstr "Decimales de Moneda"
 
 msgctxt "field:sale.sale,description:"
 msgid "Description"
-msgstr "Descripció"
+msgstr "Descripción"
 
 msgctxt "field:sale.sale,id:"
 msgid "ID"
@@ -385,91 +388,91 @@ msgstr "ID"
 
 msgctxt "field:sale.sale,invoice_address:"
 msgid "Invoice Address"
-msgstr "Adreça de facturació"
+msgstr "Dirección de Facturación"
 
 msgctxt "field:sale.sale,invoice_method:"
 msgid "Invoice Method"
-msgstr "Mètode de facturació"
+msgstr "Método de Facturación"
 
 msgctxt "field:sale.sale,invoice_state:"
 msgid "Invoice State"
-msgstr "Estat factura"
+msgstr "Estado de Factura"
 
 msgctxt "field:sale.sale,invoices:"
 msgid "Invoices"
-msgstr "Factures"
+msgstr "Facturas"
 
 msgctxt "field:sale.sale,invoices_ignored:"
 msgid "Ignored Invoices"
-msgstr "Factures ignorades"
+msgstr "Facturas Ignoradas"
 
 msgctxt "field:sale.sale,invoices_recreated:"
 msgid "Recreated Invoices"
-msgstr "Factures recreades"
+msgstr "Facturas Recreadas"
 
 msgctxt "field:sale.sale,lines:"
 msgid "Lines"
-msgstr "Línies"
+msgstr "Líneas"
 
 msgctxt "field:sale.sale,moves:"
 msgid "Moves"
-msgstr "Moviments"
+msgstr "Movimientos"
 
 msgctxt "field:sale.sale,party:"
 msgid "Party"
-msgstr "Tercer"
+msgstr "Tercero"
 
 msgctxt "field:sale.sale,party_lang:"
 msgid "Party Language"
-msgstr "Idioma del tercer"
+msgstr "Idioma del Tercero"
 
 msgctxt "field:sale.sale,payment_term:"
 msgid "Payment Term"
-msgstr "Termini de pagament"
+msgstr "Plazo de Pago"
 
 msgctxt "field:sale.sale,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.sale,reference:"
 msgid "Reference"
-msgstr "Referència"
+msgstr "Referencia"
 
 msgctxt "field:sale.sale,sale_date:"
 msgid "Sale Date"
-msgstr "Data de venda"
+msgstr "Fecha de Venta"
 
 msgctxt "field:sale.sale,shipment_address:"
 msgid "Shipment Address"
-msgstr "Adreça enviament"
+msgstr "Dirección de Envío"
 
 msgctxt "field:sale.sale,shipment_method:"
 msgid "Shipment Method"
-msgstr "Mètode d'enviament"
+msgstr "Método de Envío"
 
 msgctxt "field:sale.sale,shipment_returns:"
 msgid "Shipment Returns"
-msgstr "Albarans de devolució"
+msgstr "Devolución de Envío"
 
 msgctxt "field:sale.sale,shipment_state:"
 msgid "Shipment State"
-msgstr "Estat enviament"
+msgstr "Estado de Envío"
 
 msgctxt "field:sale.sale,shipments:"
 msgid "Shipments"
-msgstr "Albarans"
+msgstr "Envíos"
 
 msgctxt "field:sale.sale,state:"
 msgid "State"
-msgstr "Estat"
+msgstr "Estado"
 
 msgctxt "field:sale.sale,tax_amount:"
 msgid "Tax"
-msgstr "Impost"
+msgstr "Impuesto"
 
 msgctxt "field:sale.sale,tax_amount_cache:"
 msgid "Tax Cache"
-msgstr "Impostos precalculats"
+msgstr "Impuestos Precalculado"
 
 msgctxt "field:sale.sale,total_amount:"
 msgid "Total"
@@ -477,35 +480,35 @@ msgstr "Total"
 
 msgctxt "field:sale.sale,total_amount_cache:"
 msgid "Total Tax"
-msgstr "Total impostos"
+msgstr "Total Impuestos"
 
 msgctxt "field:sale.sale,untaxed_amount:"
 msgid "Untaxed"
-msgstr "Base imposable"
+msgstr "Base Sin Impuesto"
 
 msgctxt "field:sale.sale,untaxed_amount_cache:"
 msgid "Untaxed Cache"
-msgstr "Base imposable precalculada"
+msgstr "Base Sin Impuesto Precalculada"
 
 msgctxt "field:sale.sale,warehouse:"
 msgid "Warehouse"
-msgstr "Magatzem"
+msgstr "Depósito"
 
 msgctxt "field:sale.sale,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.sale,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.sale-ignored-account.invoice,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.sale-ignored-account.invoice,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.sale-ignored-account.invoice,id:"
 msgid "ID"
@@ -517,27 +520,27 @@ msgstr "Factura"
 
 msgctxt "field:sale.sale-ignored-account.invoice,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.sale-ignored-account.invoice,sale:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "field:sale.sale-ignored-account.invoice,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.sale-ignored-account.invoice,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.sale-recreated-account.invoice,create_date:"
 msgid "Create Date"
-msgstr "Data creació"
+msgstr "Fecha de Creación"
 
 msgctxt "field:sale.sale-recreated-account.invoice,create_uid:"
 msgid "Create User"
-msgstr "Usuari creació"
+msgstr "Creado por Usuario"
 
 msgctxt "field:sale.sale-recreated-account.invoice,id:"
 msgid "ID"
@@ -549,244 +552,244 @@ msgstr "Factura"
 
 msgctxt "field:sale.sale-recreated-account.invoice,rec_name:"
 msgid "Name"
-msgstr "Nom"
+msgstr "Nombre"
 
 msgctxt "field:sale.sale-recreated-account.invoice,sale:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "field:sale.sale-recreated-account.invoice,write_date:"
 msgid "Write Date"
-msgstr "Data modificació"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:sale.sale-recreated-account.invoice,write_uid:"
 msgid "Write User"
-msgstr "Usuari modificació"
+msgstr "Modificado por Usuario"
 
 msgctxt "field:stock.move,sale:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "field:stock.move,sale_exception_state:"
 msgid "Exception State"
-msgstr "Estat excepció"
+msgstr "Estado Excepción"
 
 msgctxt "help:product.template,delivery_time:"
 msgid "In number of days"
-msgstr "En nombre de dies."
+msgstr "En número de días"
 
 msgctxt "help:sale.handle.invoice.exception.ask,recreate_invoices:"
 msgid ""
 "The selected invoices will be recreated. The other ones will be ignored."
 msgstr ""
-"Les factures seleccionades seran recreades. Les altres seran ignorades."
+"Las facturas seleccionadas serán recreadas. Las otras serán ignoradas."
 
 msgctxt "model:ir.action,name:act_invoice_form"
 msgid "Invoices"
-msgstr "Factures"
+msgstr "Facturas"
 
 msgctxt "model:ir.action,name:act_open_customer"
 msgid "Parties associated to Sales"
-msgstr "Tercers amb vendes"
+msgstr "Clientes"
 
 msgctxt "model:ir.action,name:act_return_form"
 msgid "Returns"
-msgstr "Devolució"
+msgstr "Devolución"
 
 msgctxt "model:ir.action,name:act_sale_configuration_form"
 msgid "Sales Configuration"
-msgstr "Configuració de les vendes"
+msgstr "Configuración de Ventas"
 
 msgctxt "model:ir.action,name:act_sale_form"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:ir.action,name:act_sale_form2"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:ir.action,name:act_sale_invoice_relate"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:ir.action,name:act_sale_shipments_relate"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:ir.action,name:act_shipment_form"
 msgid "Shipments"
-msgstr "Albarans"
+msgstr "Envíos"
 
 msgctxt "model:ir.action,name:report_sale"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "model:ir.action,name:wizard_invoice_handle_exception"
 msgid "Handle Invoice Exception"
-msgstr "Gestiona excepció de factura"
+msgstr "Gestionar Excepción de Factura"
 
 msgctxt "model:ir.action,name:wizard_return_sale"
 msgid "Return Sale"
-msgstr "Devolució comanda"
+msgstr "Crear Devolución de Venta"
 
 msgctxt "model:ir.action,name:wizard_shipment_handle_exception"
 msgid "Handle Shipment Exception"
-msgstr "Gestiona excepció d'enviament"
+msgstr "Gestionar Excepción de Envío"
 
 msgctxt "model:ir.action.act_window.domain,name:act_sale_form_domain_all"
 msgid "All"
-msgstr "Tot"
+msgstr "Todo"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_sale_form_domain_confirmed"
 msgid "Confirmed"
-msgstr "Confirmat"
+msgstr "Confirmada"
 
 msgctxt "model:ir.action.act_window.domain,name:act_sale_form_domain_draft"
 msgid "Draft"
-msgstr "Esborrany"
+msgstr "Borrador"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_sale_form_domain_processing"
 msgid "Processing"
-msgstr "En procés"
+msgstr "En Proceso"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_sale_form_domain_quotation"
 msgid "Quotation"
-msgstr "Pressupost"
+msgstr "Cotización"
 
 msgctxt "model:ir.sequence,name:sequence_sale"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "model:ir.sequence.type,name:sequence_type_sale"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "model:ir.ui.menu,name:menu_configuration"
 msgid "Configuration"
-msgstr "Configuració"
+msgstr "Configuración"
 
 msgctxt "model:ir.ui.menu,name:menu_customer"
 msgid "Parties associated to Sales"
-msgstr "Tercers amb vendes"
+msgstr "Clientes"
 
 msgctxt "model:ir.ui.menu,name:menu_sale"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:ir.ui.menu,name:menu_sale_configuration"
 msgid "Sales Configuration"
-msgstr "Vendes"
+msgstr "Configuración de Ventas"
 
 msgctxt "model:ir.ui.menu,name:menu_sale_form"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:res.group,name:group_sale"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "model:res.group,name:group_sale_admin"
 msgid "Sales Administrator"
-msgstr "Administració de vendes"
+msgstr "Administrador de Ventas"
 
 msgctxt "model:sale.configuration,name:"
 msgid "Sale Configuration"
-msgstr "Configuració de les vendes"
+msgstr "Configuración Ventas"
 
 msgctxt "model:sale.handle.invoice.exception.ask,name:"
 msgid "Handle Invoice Exception"
-msgstr "Gestiona excepció de factura"
+msgstr "Gestionar Excepción de Factura"
 
 msgctxt "model:sale.handle.shipment.exception.ask,name:"
 msgid "Handle Shipment Exception"
-msgstr "Gestiona excepció d'enviament"
+msgstr "Gestionar Excepción de Envío"
 
 msgctxt "model:sale.line,name:"
 msgid "Sale Line"
-msgstr "Línia de venda"
+msgstr "Línea de Venta"
 
 msgctxt "model:sale.line-account.tax,name:"
 msgid "Sale Line - Tax"
-msgstr "Línia de venda - Impost"
+msgstr "Línea de Venta - Impuesto"
 
 msgctxt "model:sale.line-ignored-stock.move,name:"
 msgid "Sale Line - Ignored Move"
-msgstr "Línia de venda - Moviment ignorat"
+msgstr "Línea de Venta - Movimiento Ignorado"
 
 msgctxt "model:sale.line-recreated-stock.move,name:"
 msgid "Sale Line - Recreated Move"
-msgstr "Línia de venda - Moviment recreat"
+msgstr "Línea de Venta - Movimiento Recreado"
 
 msgctxt "model:sale.return_sale.start,name:"
 msgid "Return Sale"
-msgstr "Devolució comanda"
+msgstr "Crear Devolución de Venta"
 
 msgctxt "model:sale.sale,name:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "model:sale.sale-ignored-account.invoice,name:"
 msgid "Sale - Ignored Invoice"
-msgstr "Venda - Factura ignorada"
+msgstr "Venta - Factura Ignorada"
 
 msgctxt "model:sale.sale-recreated-account.invoice,name:"
 msgid "Sale - Recreated Invoice"
-msgstr "Venda - Factura recreada"
+msgstr "Venta - Factura Recreada"
 
 msgctxt "odt:sale.sale:"
 msgid "Amount"
-msgstr "Import"
+msgstr "Subtotal"
 
 msgctxt "odt:sale.sale:"
 msgid "Date:"
-msgstr "Data:"
+msgstr "Fecha:"
 
 msgctxt "odt:sale.sale:"
 msgid "Description"
-msgstr "Descripció"
+msgstr "Descripción"
 
 msgctxt "odt:sale.sale:"
 msgid "Description:"
-msgstr "Descripció:"
+msgstr "Descripción:"
 
 msgctxt "odt:sale.sale:"
 msgid "Draft Sale Order"
-msgstr "Comanda de Venda Esborrany"
+msgstr "Pedido de Venta en Borrador"
 
 msgctxt "odt:sale.sale:"
 msgid "E-Mail:"
-msgstr "Correu electrònic:"
+msgstr "Correo electrónico:"
 
 msgctxt "odt:sale.sale:"
 msgid "Phone:"
-msgstr "Telèfon:"
+msgstr "Teléfono:"
 
 msgctxt "odt:sale.sale:"
 msgid "Quantity"
-msgstr "Quantitat"
+msgstr "Cantidad"
 
 msgctxt "odt:sale.sale:"
 msgid "Quotation N°:"
-msgstr "Pressupost Núm.:"
+msgstr "Cotización Nº:"
 
 msgctxt "odt:sale.sale:"
 msgid "Sale Order N°:"
-msgstr "Venta Núm.:"
+msgstr "Orden de Venta Nº:"
 
 msgctxt "odt:sale.sale:"
 msgid "Taxes"
-msgstr "Impostos"
+msgstr "Impuestos"
 
 msgctxt "odt:sale.sale:"
 msgid "Taxes:"
-msgstr "Impostos:"
+msgstr "Impuestos:"
 
 msgctxt "odt:sale.sale:"
 msgid "Total (excl. taxes):"
-msgstr "Base imposable:"
+msgstr "Base (sin impuestos):"
 
 msgctxt "odt:sale.sale:"
 msgid "Total:"
@@ -794,15 +797,15 @@ msgstr "Total:"
 
 msgctxt "odt:sale.sale:"
 msgid "Unit Price"
-msgstr "Preu unitari"
+msgstr "Precio Unitario"
 
 msgctxt "odt:sale.sale:"
 msgid "VAT Number:"
-msgstr "CIF/NIF:"
+msgstr "Número de RUC:"
 
 msgctxt "odt:sale.sale:"
 msgid "VAT:"
-msgstr "CIF/NIF:"
+msgstr "RUC:"
 
 msgctxt "selection:account.invoice,sale_exception_state:"
 msgid ""
@@ -810,7 +813,7 @@ msgstr ""
 
 msgctxt "selection:account.invoice,sale_exception_state:"
 msgid "Ignored"
-msgstr "Ignorat"
+msgstr "Ignorado"
 
 msgctxt "selection:account.invoice,sale_exception_state:"
 msgid "Recreated"
@@ -822,11 +825,11 @@ msgstr "Manual"
 
 msgctxt "selection:sale.configuration,sale_invoice_method:"
 msgid "On Order Processed"
-msgstr "Al processar la comanda"
+msgstr "Al Procesar Pedido"
 
 msgctxt "selection:sale.configuration,sale_invoice_method:"
 msgid "On Shipment Sent"
-msgstr "Al enviar-ho"
+msgstr "Al Enviar"
 
 msgctxt "selection:sale.configuration,sale_shipment_method:"
 msgid "Manual"
@@ -834,19 +837,19 @@ msgstr "Manual"
 
 msgctxt "selection:sale.configuration,sale_shipment_method:"
 msgid "On Invoice Paid"
-msgstr "Al pagar la factura"
+msgstr "Al Pagar la Factura"
 
 msgctxt "selection:sale.configuration,sale_shipment_method:"
 msgid "On Order Processed"
-msgstr "Al processar la comanda"
+msgstr "Al Procesar Pedido"
 
 msgctxt "selection:sale.line,type:"
 msgid "Comment"
-msgstr "Comentari"
+msgstr "Comentario"
 
 msgctxt "selection:sale.line,type:"
 msgid "Line"
-msgstr "Línia"
+msgstr "Línea"
 
 msgctxt "selection:sale.line,type:"
 msgid "Subtotal"
@@ -854,7 +857,7 @@ msgstr "Subtotal"
 
 msgctxt "selection:sale.line,type:"
 msgid "Title"
-msgstr "Títol"
+msgstr "Título"
 
 msgctxt "selection:sale.sale,invoice_method:"
 msgid "Manual"
@@ -862,19 +865,19 @@ msgstr "Manual"
 
 msgctxt "selection:sale.sale,invoice_method:"
 msgid "On Order Processed"
-msgstr "Al processar la comanda"
+msgstr "Al Procesar el Pedido"
 
 msgctxt "selection:sale.sale,invoice_method:"
 msgid "On Shipment Sent"
-msgstr "Al enviar-ho"
+msgstr "Al Enviar"
 
 msgctxt "selection:sale.sale,invoice_state:"
 msgid "Exception"
-msgstr "Excepció"
+msgstr "Excepción"
 
 msgctxt "selection:sale.sale,invoice_state:"
 msgid "None"
-msgstr "Cap"
+msgstr "Ninguno"
 
 msgctxt "selection:sale.sale,invoice_state:"
 msgid "Paid"
@@ -882,7 +885,7 @@ msgstr "Pagada"
 
 msgctxt "selection:sale.sale,invoice_state:"
 msgid "Waiting"
-msgstr "En espera"
+msgstr "En Espera"
 
 msgctxt "selection:sale.sale,shipment_method:"
 msgid "Manual"
@@ -890,19 +893,19 @@ msgstr "Manual"
 
 msgctxt "selection:sale.sale,shipment_method:"
 msgid "On Invoice Paid"
-msgstr "Al pagar la factura"
+msgstr "Al Pagar la Factura"
 
 msgctxt "selection:sale.sale,shipment_method:"
 msgid "On Order Processed"
-msgstr "Al processar la comanda"
+msgstr "Al Procesar Pedido"
 
 msgctxt "selection:sale.sale,shipment_state:"
 msgid "Exception"
-msgstr "Excepció"
+msgstr "Excepción"
 
 msgctxt "selection:sale.sale,shipment_state:"
 msgid "None"
-msgstr "Cap"
+msgstr "Ninguno"
 
 msgctxt "selection:sale.sale,shipment_state:"
 msgid "Sent"
@@ -910,11 +913,11 @@ msgstr "Enviada"
 
 msgctxt "selection:sale.sale,shipment_state:"
 msgid "Waiting"
-msgstr "En espera"
+msgstr "En Espera"
 
 msgctxt "selection:sale.sale,state:"
 msgid "Canceled"
-msgstr "Cancel·lada"
+msgstr "Cancelada"
 
 msgctxt "selection:sale.sale,state:"
 msgid "Confirmed"
@@ -922,19 +925,19 @@ msgstr "Confirmada"
 
 msgctxt "selection:sale.sale,state:"
 msgid "Done"
-msgstr "Finalitzada"
+msgstr "Realizada"
 
 msgctxt "selection:sale.sale,state:"
 msgid "Draft"
-msgstr "Esborrany"
+msgstr "Borrador"
 
 msgctxt "selection:sale.sale,state:"
 msgid "Processing"
-msgstr "En procés"
+msgstr "En Proceso"
 
 msgctxt "selection:sale.sale,state:"
 msgid "Quotation"
-msgstr "Pressupost"
+msgstr "Cotización"
 
 msgctxt "selection:stock.move,sale_exception_state:"
 msgid ""
@@ -942,43 +945,43 @@ msgstr ""
 
 msgctxt "selection:stock.move,sale_exception_state:"
 msgid "Ignored"
-msgstr "Ignorat"
+msgstr "Ignorado"
 
 msgctxt "selection:stock.move,sale_exception_state:"
 msgid "Recreated"
-msgstr "Recreat"
+msgstr "Recreado"
 
 msgctxt "view:party.party:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "view:product.product:"
 msgid "Products"
-msgstr "Productes"
+msgstr "Productos"
 
 msgctxt "view:product.template:"
 msgid "Customers"
-msgstr "Clients"
+msgstr "Clientes"
 
 msgctxt "view:sale.configuration:"
 msgid "Sale Configuration"
-msgstr "Configuració comades de venda"
+msgstr "Configuración de Venta"
 
 msgctxt "view:sale.handle.invoice.exception.ask:"
 msgid "Choose invoices to recreate"
-msgstr "Tria una factura a refer"
+msgstr "Seleccione las facturas a recrear"
 
 msgctxt "view:sale.handle.invoice.exception.ask:"
 msgid "Handle Invoice Exception"
-msgstr "Gestiona excepció de factura"
+msgstr "Gestionar Excepción de Factura"
 
 msgctxt "view:sale.handle.shipment.exception.ask:"
 msgid "Choose move to recreate"
-msgstr "Tria un moviment a refer"
+msgstr "Seleccione los movimientos a recrear"
 
 msgctxt "view:sale.handle.shipment.exception.ask:"
 msgid "Handle shipment Exception"
-msgstr "Gestiona excepció d'enviament"
+msgstr "Gestionar Excepción de Envío"
 
 msgctxt "view:sale.line:"
 msgid "General"
@@ -986,96 +989,96 @@ msgstr "General"
 
 msgctxt "view:sale.line:"
 msgid "Notes"
-msgstr "Notes"
+msgstr "Notas"
 
 msgctxt "view:sale.line:"
 msgid "Sale Line"
-msgstr "Línia de venda"
+msgstr "Línea de Venta"
 
 msgctxt "view:sale.line:"
 msgid "Sale Lines"
-msgstr "Línies de venda"
+msgstr "Líneas de Venta"
 
 msgctxt "view:sale.return_sale.start:"
 msgid "Are you sure to return those/this sale(s)?"
-msgstr "Esteu segur de retornar aquestes comandes de venda?"
+msgstr "¿Está seguro que desea devolver esta(s) venta(s)?"
 
 msgctxt "view:sale.return_sale.start:"
 msgid "Return Sale"
-msgstr "Devolució comanda"
+msgstr "Crear Devolución de Venta"
 
 msgctxt "view:sale.sale:"
 msgid "Cancel"
-msgstr "Cancel·la"
+msgstr "Cancelar"
 
 msgctxt "view:sale.sale:"
 msgid "Confirm"
-msgstr "Confirma"
+msgstr "Confirmar"
 
 msgctxt "view:sale.sale:"
 msgid "Draft"
-msgstr "Esborrany"
+msgstr "Borrador"
 
 msgctxt "view:sale.sale:"
 msgid "Handle Invoice Exception"
-msgstr "Gestiona excepció de factura"
+msgstr "Gestionar Excepción de Factura"
 
 msgctxt "view:sale.sale:"
 msgid "Handle Shipment Exception"
-msgstr "Gestiona excepció d'enviament"
+msgstr "Gestionar Excepción de Envío"
 
 msgctxt "view:sale.sale:"
 msgid "Invoices"
-msgstr "Factures"
+msgstr "Facturas"
 
 msgctxt "view:sale.sale:"
 msgid "Other Info"
-msgstr "Informació addicional"
+msgstr "Información Adicional"
 
 msgctxt "view:sale.sale:"
 msgid "Process"
-msgstr "Processa"
+msgstr "Procesar"
 
 msgctxt "view:sale.sale:"
 msgid "Quote"
-msgstr "Pressupost"
+msgstr "Cotizar"
 
 msgctxt "view:sale.sale:"
 msgid "Sale"
-msgstr "Venda"
+msgstr "Venta"
 
 msgctxt "view:sale.sale:"
 msgid "Sales"
-msgstr "Vendes"
+msgstr "Ventas"
 
 msgctxt "view:sale.sale:"
 msgid "Shipments"
-msgstr "Albarans"
+msgstr "Envíos"
 
 msgctxt "view:stock.move:"
 msgid "Moves"
-msgstr "Moviments"
+msgstr "Movimientos"
 
 msgctxt "wizard_button:sale.handle.invoice.exception,ask,end:"
 msgid "Cancel"
-msgstr "Cancel·la"
+msgstr "Cancelar"
 
 msgctxt "wizard_button:sale.handle.invoice.exception,ask,handle:"
 msgid "Ok"
-msgstr "Accepta"
+msgstr "Aceptar"
 
 msgctxt "wizard_button:sale.handle.shipment.exception,ask,end:"
 msgid "Cancel"
-msgstr "Cancel·la"
+msgstr "Cancelar"
 
 msgctxt "wizard_button:sale.handle.shipment.exception,ask,handle:"
 msgid "Ok"
-msgstr "Accepta"
+msgstr "Aceptar"
 
 msgctxt "wizard_button:sale.return_sale,start,end:"
 msgid "Cancel"
-msgstr "Cancel·la"
+msgstr "Cancelar"
 
 msgctxt "wizard_button:sale.return_sale,start,return_:"
 msgid "Return"
-msgstr "Devolució"
+msgstr "Devolver"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 526b8a5..11629af 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -9,25 +9,25 @@ msgstr "Vous ne pouvez pas réinitialiser une facture générée par une vente."
 msgctxt "error:sale.line:"
 msgid "Product \"%(product)s\" of sale %(sale)s misses a revenue account."
 msgstr ""
-"Le produit \"%(product)s\" de la vente %(sale)s n'a pas de compte de revenu."
+"Le produit « %(product)s » de la vente %(sale)s n'a pas de compte de revenu."
 
 msgctxt "error:sale.line:"
 msgid "Sale \"%(sale)s\" is missing the customer location in line \"%(line)s\"."
 msgstr ""
-"L'emplacement client est manquant sur la ligne \"%(line)s\" de la vente "
-"\"%(sale)s\"."
+"L'emplacement client est manquant sur la ligne « %(line)s » de la vente « "
+"%(sale)s »."
 
 msgctxt "error:sale.line:"
 msgid "Sale \"%(sale)s\" misses an \"account revenue\" default property."
 msgstr ""
-"La propriété par défaut \"Compte de produit\" est absente de la vente "
-"\"%(sale)s\""
+"La propriété par défaut « Compte de produit » est absente de la vente « "
+"%(sale)s »."
 
 msgctxt "error:sale.sale:"
 msgid "Invalid combination of shipment and invoicing methods on sale \"%s\"."
 msgstr ""
 "Combinaison de méthodes de livraison et de facturation invalide sur la vente"
-" \"%s\"."
+" « %s »."
 
 msgctxt "error:sale.sale:"
 msgid ""
@@ -35,19 +35,19 @@ msgid ""
 "\"%s\"."
 msgstr ""
 "Les adresses de facturation et de livraison doivent être définies pour le "
-"devis de vente \"%s\"."
+"devis de vente « %s »."
 
 msgctxt "error:sale.sale:"
 msgid "It misses an \"Account Receivable\" on the party \"%s\"."
-msgstr "Le compte à recevoir est manquant sur le tiers \"%s\"."
+msgstr "Le compte à recevoir est manquant sur le tiers « %s »."
 
 msgctxt "error:sale.sale:"
 msgid "Sale \"%s\" must be cancelled before deletion."
-msgstr "La vente \"%s\" doit être annulée avant suppression."
+msgstr "La vente « %s » doit être annulée avant suppression."
 
 msgctxt "error:sale.sale:"
 msgid "Warehouse must be defined for the quotation of sale \"%s\"."
-msgstr "Un entrepôt doit être défini pour le devis de la vente \"%s\"."
+msgstr "Un entrepôt doit être défini pour le devis de la vente « %s »."
 
 msgctxt "error:stock.shipment.out.return:"
 msgid "You cannot reset to draft a move generated by a sale."
@@ -483,7 +483,7 @@ msgstr "Total des taxes"
 
 msgctxt "field:sale.sale,untaxed_amount:"
 msgid "Untaxed"
-msgstr "Non-taxé"
+msgstr "Hors taxe"
 
 msgctxt "field:sale.sale,untaxed_amount_cache:"
 msgid "Untaxed Cache"
@@ -744,7 +744,7 @@ msgstr "Montant"
 
 msgctxt "odt:sale.sale:"
 msgid "Date:"
-msgstr "Date :"
+msgstr "Date :"
 
 msgctxt "odt:sale.sale:"
 msgid "Description"
@@ -752,7 +752,7 @@ msgstr "Description"
 
 msgctxt "odt:sale.sale:"
 msgid "Description:"
-msgstr "Description :"
+msgstr "Description :"
 
 msgctxt "odt:sale.sale:"
 msgid "Draft Sale Order"
@@ -760,11 +760,11 @@ msgstr "Bon de commande brouillon"
 
 msgctxt "odt:sale.sale:"
 msgid "E-Mail:"
-msgstr "E-Mail :"
+msgstr "Email :"
 
 msgctxt "odt:sale.sale:"
 msgid "Phone:"
-msgstr "Téléphone :"
+msgstr "Téléphone :"
 
 msgctxt "odt:sale.sale:"
 msgid "Quantity"
@@ -772,11 +772,11 @@ msgstr "Quantité"
 
 msgctxt "odt:sale.sale:"
 msgid "Quotation N°:"
-msgstr "Devis N° :"
+msgstr "Devis N° :"
 
 msgctxt "odt:sale.sale:"
 msgid "Sale Order N°:"
-msgstr "Bon de commande N° :"
+msgstr "Bon de commande N° :"
 
 msgctxt "odt:sale.sale:"
 msgid "Taxes"
@@ -784,15 +784,15 @@ msgstr "Taxes"
 
 msgctxt "odt:sale.sale:"
 msgid "Taxes:"
-msgstr "Taxes :"
+msgstr "Taxes :"
 
 msgctxt "odt:sale.sale:"
 msgid "Total (excl. taxes):"
-msgstr "Total (HT) :"
+msgstr "Total (HT) :"
 
 msgctxt "odt:sale.sale:"
 msgid "Total:"
-msgstr "Total :"
+msgstr "Total :"
 
 msgctxt "odt:sale.sale:"
 msgid "Unit Price"
@@ -800,11 +800,11 @@ msgstr "Prix unitaire"
 
 msgctxt "odt:sale.sale:"
 msgid "VAT Number:"
-msgstr "Numéro TVA :"
+msgstr "Numéro TVA :"
 
 msgctxt "odt:sale.sale:"
 msgid "VAT:"
-msgstr "TVA :"
+msgstr "TVA :"
 
 msgctxt "selection:account.invoice,sale_exception_state:"
 msgid ""
@@ -1000,7 +1000,7 @@ msgstr "Lignes de vente"
 
 msgctxt "view:sale.return_sale.start:"
 msgid "Are you sure to return those/this sale(s)?"
-msgstr "Êtes-vous sûr de retourner ces/cette vente(s) ?"
+msgstr "Êtes-vous sûr de retourner ces/cette vente(s) ?"
 
 msgctxt "view:sale.return_sale.start:"
 msgid "Return Sale"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 4a0922d..1fb6359 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -84,11 +84,11 @@ msgstr "Prodajna ME"
 
 msgctxt "field:sale.configuration,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.configuration,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.configuration,id:"
 msgid "ID"
@@ -128,7 +128,7 @@ msgstr "ID"
 
 msgctxt "field:sale.handle.invoice.exception.ask,recreate_invoices:"
 msgid "Recreate Invoices"
-msgstr "Poustvarjeni računi"
+msgstr "Ponovno izdelani računi"
 
 msgctxt "field:sale.handle.shipment.exception.ask,domain_moves:"
 msgid "Domain Moves"
@@ -140,7 +140,7 @@ msgstr "ID"
 
 msgctxt "field:sale.handle.shipment.exception.ask,recreate_moves:"
 msgid "Recreate Moves"
-msgstr "Poustvarjen promet"
+msgstr "Ponovno izdelan promet"
 
 msgctxt "field:sale.line,amount:"
 msgid "Amount"
@@ -148,11 +148,11 @@ msgstr "Znesek"
 
 msgctxt "field:sale.line,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.line,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.line,delivery_date:"
 msgid "Delivery Date"
@@ -192,7 +192,7 @@ msgstr "Prezrt promet"
 
 msgctxt "field:sale.line,moves_recreated:"
 msgid "Recreated Moves"
-msgstr "Prenosi poustvarjeni"
+msgstr "Ponovno izdelan promet"
 
 msgctxt "field:sale.line,note:"
 msgid "Note"
@@ -260,11 +260,11 @@ msgstr "Zapisal"
 
 msgctxt "field:sale.line-account.tax,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.line-account.tax,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.line-account.tax,id:"
 msgid "ID"
@@ -292,11 +292,11 @@ msgstr "Zapisal"
 
 msgctxt "field:sale.line-ignored-stock.move,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.line-ignored-stock.move,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.line-ignored-stock.move,id:"
 msgid "ID"
@@ -324,11 +324,11 @@ msgstr "Zapisal"
 
 msgctxt "field:sale.line-recreated-stock.move,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.line-recreated-stock.move,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.line-recreated-stock.move,id:"
 msgid "ID"
@@ -368,11 +368,11 @@ msgstr "Družba"
 
 msgctxt "field:sale.sale,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.sale,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.sale,currency:"
 msgid "Currency"
@@ -412,7 +412,7 @@ msgstr "Prezrti računi"
 
 msgctxt "field:sale.sale,invoices_recreated:"
 msgid "Recreated Invoices"
-msgstr "Poustvarjeni računi"
+msgstr "Ponovno izdelani računi"
 
 msgctxt "field:sale.sale,lines:"
 msgid "Lines"
@@ -508,11 +508,11 @@ msgstr "Zapisal"
 
 msgctxt "field:sale.sale-ignored-account.invoice,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.sale-ignored-account.invoice,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.sale-ignored-account.invoice,id:"
 msgid "ID"
@@ -540,11 +540,11 @@ msgstr "Zapisal"
 
 msgctxt "field:sale.sale-recreated-account.invoice,create_date:"
 msgid "Create Date"
-msgstr "Ustvarjeno"
+msgstr "Izdelano"
 
 msgctxt "field:sale.sale-recreated-account.invoice,create_uid:"
 msgid "Create User"
-msgstr "Ustvaril"
+msgstr "Izdelal"
 
 msgctxt "field:sale.sale-recreated-account.invoice,id:"
 msgid "ID"
@@ -585,7 +585,7 @@ msgstr "V dnevih"
 msgctxt "help:sale.handle.invoice.exception.ask,recreate_invoices:"
 msgid ""
 "The selected invoices will be recreated. The other ones will be ignored."
-msgstr "Izbrani računi bodo poustvarjeni, ostali bodo prezrti."
+msgstr "Izbrani računi bodo ponovno izdelani, ostali bodo prezrti."
 
 msgctxt "model:ir.action,name:act_invoice_form"
 msgid "Invoices"
@@ -724,7 +724,7 @@ msgstr "Prodajna postavka - Prezrt promet"
 
 msgctxt "model:sale.line-recreated-stock.move,name:"
 msgid "Sale Line - Recreated Move"
-msgstr "Prodajna postavka - Poustvarjen promet"
+msgstr "Prodajna postavka - Ponovno izdelan promet"
 
 msgctxt "model:sale.return_sale.start,name:"
 msgid "Return Sale"
@@ -740,7 +740,7 @@ msgstr "Prodajni nalog - Prezrt račun"
 
 msgctxt "model:sale.sale-recreated-account.invoice,name:"
 msgid "Sale - Recreated Invoice"
-msgstr "Prodajni nalog - Poustvarjen račun"
+msgstr "Prodajni nalog - Ponovno izdelan račun"
 
 msgctxt "odt:sale.sale:"
 msgid "Amount"
@@ -820,7 +820,7 @@ msgstr "Prezrto"
 
 msgctxt "selection:account.invoice,sale_exception_state:"
 msgid "Recreated"
-msgstr "Poustvarjeno"
+msgstr "Ponovno izdelano"
 
 msgctxt "selection:sale.configuration,sale_invoice_method:"
 msgid "Manual"
@@ -952,7 +952,7 @@ msgstr "Prezrto"
 
 msgctxt "selection:stock.move,sale_exception_state:"
 msgid "Recreated"
-msgstr "Poustvarjeno"
+msgstr "Ponovno izdelano"
 
 msgctxt "view:party.party:"
 msgid "Sale"
@@ -972,7 +972,7 @@ msgstr "Prodajna konfiguracija"
 
 msgctxt "view:sale.handle.invoice.exception.ask:"
 msgid "Choose invoices to recreate"
-msgstr "Izbor računov za poustvaritev"
+msgstr "Izbor računov za ponovno izdelavo"
 
 msgctxt "view:sale.handle.invoice.exception.ask:"
 msgid "Handle Invoice Exception"
@@ -980,7 +980,7 @@ msgstr "Obravnava pridržanih računov"
 
 msgctxt "view:sale.handle.shipment.exception.ask:"
 msgid "Choose move to recreate"
-msgstr "Izbor prometa za poustvaritev"
+msgstr "Izbor prometa za ponovno izdelavo"
 
 msgctxt "view:sale.handle.shipment.exception.ask:"
 msgid "Handle shipment Exception"
diff --git a/product.py b/product.py
index 5bea238..8cf9086 100644
--- a/product.py
+++ b/product.py
@@ -52,15 +52,20 @@ class Template:
         return 0
 
     @fields.depends('default_uom', 'sale_uom', 'salable')
-    def on_change_with_sale_uom(self):
+    def on_change_default_uom(self):
+        try:
+            changes = super(Template, self).on_change_default_uom()
+        except AttributeError:
+            changes = {}
         if self.default_uom:
             if self.sale_uom:
                 if self.default_uom.category == self.sale_uom.category:
-                    return self.sale_uom.id
+                    changes['sale_uom'] = self.sale_uom.id
                 else:
-                    return self.default_uom.id
+                    changes['sale_uom'] = self.default_uom.id
             else:
-                return self.default_uom.id
+                changes['sale_uom'] = self.default_uom.id
+        return changes
 
 
 class Product:
diff --git a/sale.py b/sale.py
index c4667a0..2a72dfd 100644
--- a/sale.py
+++ b/sale.py
@@ -67,7 +67,8 @@ class Sale(Workflow, ModelSQL, ModelView):
         depends=['state'])
     party = fields.Many2One('party.party', 'Party', required=True, select=True,
         states={
-            'readonly': Eval('state') != 'draft',
+            'readonly': ((Eval('state') != 'draft')
+                | (Eval('lines', [0]) & Eval('party'))),
             },
         depends=['state'])
     party_lang = fields.Function(fields.Char('Party Language'),
@@ -425,63 +426,89 @@ class Sale(Workflow, ModelSQL, ModelView):
         pool = Pool()
         Tax = pool.get('account.tax')
         Invoice = pool.get('account.invoice')
+        Configuration = pool.get('account.configuration')
+
+        config = Configuration(1)
 
-        res = {
+        changes = {
             'untaxed_amount': Decimal('0.0'),
             'tax_amount': Decimal('0.0'),
             'total_amount': Decimal('0.0'),
             }
 
         if self.lines:
+            context = self.get_tax_context()
             taxes = {}
+
+            def round_taxes():
+                if self.currency:
+                    for key, value in taxes.iteritems():
+                        taxes[key] = self.currency.round(value)
+
             for line in self.lines:
                 if getattr(line, 'type', 'line') != 'line':
                     continue
-                res['untaxed_amount'] += (getattr(line, 'amount', None)
+                changes['untaxed_amount'] += (getattr(line, 'amount', None)
                     or Decimal(0))
-                tax_list = ()
-                with Transaction().set_context(self.get_tax_context()):
+
+                with Transaction().set_context(context):
                     tax_list = Tax.compute(getattr(line, 'taxes', []),
                         getattr(line, 'unit_price', None) or Decimal('0.0'),
                         getattr(line, 'quantity', None) or 0.0)
                 for tax in tax_list:
                     key, val = Invoice._compute_tax(tax, 'out_invoice')
-                    if not key in taxes:
+                    if key not in taxes:
                         taxes[key] = val['amount']
                     else:
                         taxes[key] += val['amount']
-            if self.currency:
-                for key in taxes:
-                    res['tax_amount'] += self.currency.round(taxes[key])
+                if config.tax_rounding == 'line':
+                    round_taxes()
+            if config.tax_rounding == 'document':
+                round_taxes()
+            changes['tax_amount'] = sum(taxes.itervalues(), Decimal('0.0'))
         if self.currency:
-            res['untaxed_amount'] = self.currency.round(res['untaxed_amount'])
-            res['tax_amount'] = self.currency.round(res['tax_amount'])
-        res['total_amount'] = res['untaxed_amount'] + res['tax_amount']
+            changes['untaxed_amount'] = self.currency.round(
+                changes['untaxed_amount'])
+            changes['tax_amount'] = self.currency.round(changes['tax_amount'])
+        changes['total_amount'] = (changes['untaxed_amount']
+            + changes['tax_amount'])
         if self.currency:
-            res['total_amount'] = self.currency.round(res['total_amount'])
-        return res
+            changes['total_amount'] = self.currency.round(
+                changes['total_amount'])
+        return changes
 
     def get_tax_amount(self):
         pool = Pool()
         Tax = pool.get('account.tax')
         Invoice = pool.get('account.invoice')
+        Configuration = pool.get('account.configuration')
+
+        config = Configuration(1)
 
         context = self.get_tax_context()
         taxes = {}
+
+        def round_taxes():
+            for key, value in taxes.iteritems():
+                taxes[key] = self.currency.round(value)
+
         for line in self.lines:
             if line.type != 'line':
                 continue
             with Transaction().set_context(context):
                 tax_list = Tax.compute(line.taxes, line.unit_price,
                     line.quantity)
-            # Don't round on each line to handle rounding error
             for tax in tax_list:
                 key, val = Invoice._compute_tax(tax, 'out_invoice')
-                if not key in taxes:
+                if key not in taxes:
                     taxes[key] = val['amount']
                 else:
                     taxes[key] += val['amount']
-        return sum((self.currency.round(tax) for tax in taxes.values()), _ZERO)
+            if config.tax_rounding == 'line':
+                round_taxes()
+        if config.tax_rounding == 'document':
+            round_taxes()
+        return sum(taxes.itervalues(), _ZERO)
 
     @classmethod
     def get_amount(cls, sales, names):
@@ -736,17 +763,16 @@ class Sale(Workflow, ModelSQL, ModelView):
         else:
             journal = None
 
-        with Transaction().set_user(0, set_context=True):
-            return Invoice(
-                company=self.company,
-                type=invoice_type,
-                journal=journal,
-                party=self.party,
-                invoice_address=self.invoice_address,
-                currency=self.currency,
-                account=self.party.account_receivable,
-                payment_term=self.payment_term,
-                )
+        return Invoice(
+            company=self.company,
+            type=invoice_type,
+            journal=journal,
+            party=self.party,
+            invoice_address=self.invoice_address,
+            currency=self.currency,
+            account=self.party.account_receivable,
+            payment_term=self.payment_term,
+            )
 
     def create_invoice(self, invoice_type):
         '''
@@ -771,8 +797,7 @@ class Sale(Workflow, ModelSQL, ModelView):
             + list(chain.from_iterable(invoice_lines.itervalues())))
         invoice.save()
 
-        with Transaction().set_user(0, set_context=True):
-            Invoice.update_taxes([invoice])
+        Invoice.update_taxes([invoice])
         return invoice
 
     def _get_move_sale_line(self, shipment_type):
@@ -836,15 +861,13 @@ class Sale(Workflow, ModelSQL, ModelView):
 
         shipments = []
         for key, grouped_moves in groupby(moves, key=keyfunc):
-            with Transaction().set_user(0, set_context=True):
-                shipment = self._get_shipment_sale(Shipment, key)
-                shipment.moves = (list(getattr(shipment, 'moves', []))
-                    + [x[1] for x in grouped_moves])
-                shipment.save()
-                shipments.append(shipment)
+            shipment = self._get_shipment_sale(Shipment, key)
+            shipment.moves = (list(getattr(shipment, 'moves', []))
+                + [x[1] for x in grouped_moves])
+            shipment.save()
+            shipments.append(shipment)
         if shipment_type == 'out':
-            with Transaction().set_user(0, set_context=True):
-                Shipment.wait(shipments)
+            Shipment.wait(shipments)
         return shipments
 
     def is_done(self):
@@ -1252,8 +1275,7 @@ class SaleLine(ModelSQL, ModelView):
 
     def get_amount(self, name):
         if self.type == 'line':
-            return self.sale.currency.round(
-                Decimal(str(self.quantity)) * self.unit_price)
+            return self.on_change_with_amount()
         elif self.type == 'subtotal':
             amount = Decimal('0.0')
             for line2 in self.sale.lines:
@@ -1299,8 +1321,7 @@ class SaleLine(ModelSQL, ModelView):
         Property = pool.get('ir.property')
         InvoiceLine = pool.get('account.invoice.line')
 
-        with Transaction().set_user(0, set_context=True):
-            invoice_line = InvoiceLine()
+        invoice_line = InvoiceLine()
         invoice_line.type = self.type
         invoice_line.description = self.description
         invoice_line.note = self.note
@@ -1335,7 +1356,8 @@ class SaleLine(ModelSQL, ModelView):
                         self.unit)
                     if move.invoiced_quantity < move.quantity:
                         stock_moves.append(move)
-        invoice_line.stock_moves = stock_moves
+        if self.sale.shipment_method == 'order':
+            invoice_line.stock_moves = stock_moves
 
         skip_ids = set(l.id for i in self.sale.invoices_recreated
             for l in i.lines)
@@ -1345,10 +1367,12 @@ class SaleLine(ModelSQL, ModelView):
             if old_invoice_line.id not in skip_ids:
                 quantity -= Uom.compute_qty(old_invoice_line.unit,
                     old_invoice_line.quantity, self.unit)
-        invoice_line.quantity = quantity
 
-        if invoice_line.quantity <= 0.0:
+        rounding = self.unit.rounding if self.unit else 0.01
+        invoice_line.quantity = Uom.round(quantity, rounding)
+        if invoice_line.quantity <= 0:
             return []
+
         invoice_line.unit = self.unit
         invoice_line.product = self.product
         invoice_line.unit_price = self.unit_price
@@ -1403,7 +1427,8 @@ class SaleLine(ModelSQL, ModelView):
         invoice_lines = []
         if self.sale.shipment_method == 'order':
             quantity = abs(self.quantity)
-            invoice_lines = self.invoice_lines
+            if self.sale.invoice_method == 'order':
+                invoice_lines = self.invoice_lines
         else:
             quantity = 0.0
             for invoice_line in self.invoice_lines:
@@ -1418,15 +1443,17 @@ class SaleLine(ModelSQL, ModelView):
             if move.id not in skip_ids:
                 quantity -= Uom.compute_qty(move.uom, move.quantity,
                     self.unit)
-        if quantity <= 0.0:
+
+        quantity = Uom.round(quantity, self.unit.rounding)
+        if quantity <= 0:
             return
+
         if not self.sale.party.customer_location:
             self.raise_user_error('customer_location_required', {
                     'sale': self.sale.rec_name,
                     'line': self.rec_name,
                     })
-        with Transaction().set_user(0, set_context=True):
-            move = Move()
+        move = Move()
         move.quantity = quantity
         move.uom = self.unit
         move.product = self.product
diff --git a/stock.py b/stock.py
index f05264f..3226e32 100644
--- a/stock.py
+++ b/stock.py
@@ -39,7 +39,7 @@ class ShipmentOut:
             for shipment in shipments:
                 move_ids.extend([x.id for x in shipment.outgoing_moves])
 
-            with Transaction().set_user(0, set_context=True):
+            with Transaction().set_context(_check_access=False):
                 sale_lines = SaleLine.search([
                         ('moves', 'in', move_ids),
                         ])
@@ -89,7 +89,7 @@ class ShipmentOutReturn:
             for shipment in shipments:
                 move_ids.extend([x.id for x in shipment.incoming_moves])
 
-            with Transaction().set_user(0, set_context=True):
+            with Transaction().set_context(_check_access=False):
                 sale_lines = SaleLine.search([
                         ('moves', 'in', move_ids),
                         ])
@@ -193,14 +193,13 @@ class Move:
 
         super(Move, cls).cancel(moves)
 
-        with Transaction().set_user(0, set_context=True):
-            sale_lines = SaleLine.search([
-                    ('moves', 'in', [m.id for m in moves]),
-                    ])
-            if sale_lines:
-                sale_ids = list(set(l.sale.id for l in sale_lines))
-                sales = Sale.browse(sale_ids)
-                Sale.process(sales)
+        sale_lines = SaleLine.search([
+                ('moves', 'in', [m.id for m in moves]),
+                ])
+        if sale_lines:
+            sale_ids = list(set(l.sale.id for l in sale_lines))
+            sales = Sale.browse(sale_ids)
+            Sale.process(sales)
 
     @classmethod
     def delete(cls, moves):
@@ -208,7 +207,7 @@ class Move:
         Sale = pool.get('sale.sale')
         SaleLine = pool.get('sale.line')
 
-        with Transaction().set_user(0, set_context=True):
+        with Transaction().set_context(_check_access=False):
             sale_lines = SaleLine.search([
                     ('moves', 'in', [m.id for m in moves]),
                     ])
@@ -217,5 +216,5 @@ class Move:
 
         if sale_lines:
             sales = list(set(l.sale for l in sale_lines))
-            with Transaction().set_user(0, set_context=True):
+            with Transaction().set_context(_check_access=False):
                 Sale.process(sales)
diff --git a/tests/scenario_sale.rst b/tests/scenario_sale.rst
index 1e4951a..d459bba 100644
--- a/tests/scenario_sale.rst
+++ b/tests/scenario_sale.rst
@@ -679,3 +679,95 @@ Check service sale states::
     u'none'
     >>> service_sale.state
     u'done'
+
+Return sales using the wizard::
+
+    >>> config.user = sale_user.id
+    >>> sale_to_return = Sale()
+    >>> sale_to_return.party = customer
+    >>> sale_to_return.payment_term = payment_term
+    >>> sale_line = sale_to_return.lines.new()
+    >>> sale_line.product = service
+    >>> sale_line.quantity = 1
+    >>> sale_line = sale_to_return.lines.new()
+    >>> sale_line.type = 'comment'
+    >>> sale_line.description = 'Test comment'
+    >>> sale_to_return.click('quote')
+    >>> sale_to_return.click('confirm')
+    >>> sale_to_return.click('process')
+    >>> sale_to_return.state
+    u'processing'
+    >>> return_sale = Wizard('sale.return_sale', [sale_to_return])
+    >>> return_sale.execute('return_')
+    >>> returned_sale, = Sale.find([
+    ...     ('state', '=', 'draft'),
+    ...     ])
+    >>> sorted([x.quantity for x in returned_sale.lines])
+    [None, -1.0]
+
+Create a sale to be invoiced on shipment partialy and check correctly linked
+to invoices::
+
+    >>> sale = Sale()
+    >>> sale.party = customer
+    >>> sale.payment_term = payment_term
+    >>> sale.invoice_method = 'shipment'
+    >>> line = sale.lines.new()
+    >>> line.product = product
+    >>> line.quantity = 10.0
+    >>> sale.click('quote')
+    >>> sale.click('confirm')
+    >>> sale.click('process')
+    >>> shipment, = sale.shipments
+    >>> config.user = stock_user.id
+    >>> for move in shipment.inventory_moves:
+    ...     move.quantity = 5.0
+    >>> shipment.click('assign_try')
+    True
+    >>> shipment.click('pack')
+    >>> shipment.click('done')
+    >>> config.user = sale_user.id
+    >>> sale.reload()
+    >>> invoice, = sale.invoices
+    >>> invoice_line, = invoice.lines
+    >>> invoice_line.quantity
+    5.0
+    >>> stock_move, = invoice_line.stock_moves
+    >>> stock_move.quantity
+    5.0
+    >>> stock_move.state
+    u'done'
+
+Create a sale to be sent on invoice partialy and check correctly linked to
+invoices::
+
+    >>> sale = Sale()
+    >>> sale.party = customer
+    >>> sale.payment_term = payment_term
+    >>> sale.shipment_method = 'invoice'
+    >>> line = sale.lines.new()
+    >>> line.product = product
+    >>> line.quantity = 10.0
+    >>> sale.click('quote')
+    >>> sale.click('confirm')
+    >>> sale.click('process')
+    >>> invoice, = sale.invoices
+    >>> config.user = account_user.id
+    >>> invoice_line, = invoice.lines
+    >>> invoice_line.stock_moves == []
+    True
+    >>> invoice_line.quantity = 5.0
+    >>> invoice.click('post')
+    >>> pay = Wizard('account.invoice.pay', [invoice])
+    >>> pay.form.journal = cash_journal
+    >>> pay.execute('choice')
+    >>> invoice.reload()
+    >>> invoice.state
+    u'paid'
+    >>> config.user = sale_user.id
+    >>> invoice_line.reload()
+    >>> stock_move, = invoice_line.stock_moves
+    >>> stock_move.quantity
+    5.0
+    >>> stock_move.state
+    u'draft'
diff --git a/tests/test_sale.py b/tests/test_sale.py
index 733aeda..87fd72f 100644
--- a/tests/test_sale.py
+++ b/tests/test_sale.py
@@ -3,7 +3,8 @@
 import unittest
 import doctest
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import test_view, test_depends, doctest_dropdb
+from trytond.tests.test_tryton import test_view, test_depends
+from trytond.tests.test_tryton import doctest_setup, doctest_teardown
 
 
 class SaleTestCase(unittest.TestCase):
@@ -25,6 +26,6 @@ def suite():
     suite = trytond.tests.test_tryton.suite()
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(SaleTestCase))
     suite.addTests(doctest.DocFileSuite('scenario_sale.rst',
-            setUp=doctest_dropdb, tearDown=doctest_dropdb, encoding='utf-8',
+            setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
             optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
     return suite
diff --git a/tryton.cfg b/tryton.cfg
index 1c7c099..4287e4c 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.2.1
+version=3.4.0
 depends:
     account
     account_invoice
diff --git a/trytond_sale.egg-info/PKG-INFO b/trytond_sale.egg-info/PKG-INFO
index dd0e5ef..54ef3e5 100644
--- a/trytond_sale.egg-info/PKG-INFO
+++ b/trytond_sale.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-sale
-Version: 3.2.1
+Version: 3.4.0
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.2/
+Download-URL: http://downloads.tryton.org/3.4/
 Description: trytond_sale
         ============
         
diff --git a/trytond_sale.egg-info/SOURCES.txt b/trytond_sale.egg-info/SOURCES.txt
index 8be1416..d55ee5a 100644
--- a/trytond_sale.egg-info/SOURCES.txt
+++ b/trytond_sale.egg-info/SOURCES.txt
@@ -4,6 +4,7 @@ INSTALL
 LICENSE
 MANIFEST.in
 README
+TODO
 configuration.xml
 party.xml
 product.xml
@@ -31,6 +32,7 @@ tryton.cfg
 ./locale/de_DE.po
 ./locale/es_AR.po
 ./locale/es_CO.po
+./locale/es_EC.po
 ./locale/es_ES.po
 ./locale/fr_FR.po
 ./locale/nl_NL.po
@@ -60,6 +62,7 @@ locale/cs_CZ.po
 locale/de_DE.po
 locale/es_AR.po
 locale/es_CO.po
+locale/es_EC.po
 locale/es_ES.po
 locale/fr_FR.po
 locale/nl_NL.po
diff --git a/trytond_sale.egg-info/requires.txt b/trytond_sale.egg-info/requires.txt
index 4fa7d4c..354776c 100644
--- a/trytond_sale.egg-info/requires.txt
+++ b/trytond_sale.egg-info/requires.txt
@@ -1,11 +1,11 @@
 python-sql
-trytond_account >= 3.2, < 3.3
-trytond_account_invoice >= 3.2, < 3.3
-trytond_account_invoice_stock >= 3.2, < 3.3
-trytond_account_product >= 3.2, < 3.3
-trytond_company >= 3.2, < 3.3
-trytond_currency >= 3.2, < 3.3
-trytond_party >= 3.2, < 3.3
-trytond_product >= 3.2, < 3.3
-trytond_stock >= 3.2, < 3.3
-trytond >= 3.2, < 3.3
\ No newline at end of file
+trytond_account >= 3.4, < 3.5
+trytond_account_invoice >= 3.4, < 3.5
+trytond_account_invoice_stock >= 3.4, < 3.5
+trytond_account_product >= 3.4, < 3.5
+trytond_company >= 3.4, < 3.5
+trytond_currency >= 3.4, < 3.5
+trytond_party >= 3.4, < 3.5
+trytond_product >= 3.4, < 3.5
+trytond_stock >= 3.4, < 3.5
+trytond >= 3.4, < 3.5
\ No newline at end of file
diff --git a/view/handle_invoice_exception_ask_form.xml b/view/handle_invoice_exception_ask_form.xml
index c104bc1..50c30cb 100644
--- a/view/handle_invoice_exception_ask_form.xml
+++ b/view/handle_invoice_exception_ask_form.xml
@@ -5,6 +5,6 @@ this repository contains the full copyright notices and license terms. -->
     <image name="tryton-dialog-information" xexpand="0" xfill="0"/>
     <label string="Choose invoices to recreate" id="choose"
         yalign="0.0" xalign="0.0" xexpand="1"/>
-    <field name="recreate_invoices" colspan="2"/>
+    <field name="recreate_invoices" colspan="2" widget="multiselection"/>
 </form>
 
diff --git a/view/handle_shipment_exception_ask_form.xml b/view/handle_shipment_exception_ask_form.xml
index f2ec337..716ec79 100644
--- a/view/handle_shipment_exception_ask_form.xml
+++ b/view/handle_shipment_exception_ask_form.xml
@@ -5,5 +5,5 @@ this repository contains the full copyright notices and license terms. -->
     <image name="tryton-dialog-information" xexpand="0" xfill="0"/>
     <label string="Choose move to recreate" id="choose"
         yalign="0.0" xalign="0.0" xexpand="1"/>
-    <field name="recreate_moves" colspan="2" view_ids="stock.move_view_tree"/>
+    <field name="recreate_moves" colspan="2" widget="multiselection"/>
 </form>
-- 
tryton-modules-sale



More information about the tryton-debian-vcs mailing list