diff --git a/addons/l10n_ch/partner.py b/addons/l10n_ch/partner.py index f16ac6ddda5..d67023de2fa 100755 --- a/addons/l10n_ch/partner.py +++ b/addons/l10n_ch/partner.py @@ -67,10 +67,7 @@ class res_partner_bank(osv.osv): for ham, spam, address in context['address']: if 'type' in address.keys() : if address['type'] == 'default': - if field in address.keys(): - return address[field] - else: - return False + return address.get(field,False) elif not address['type']: value = address[field] else : diff --git a/addons/point_of_sale/i18n/fr_FR.po b/addons/point_of_sale/i18n/fr_FR.po index efc1130cd96..7fea213a29c 100644 --- a/addons/point_of_sale/i18n/fr_FR.po +++ b/addons/point_of_sale/i18n/fr_FR.po @@ -4,16 +4,17 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 5.0.0\n" +"Project-Id-Version: OpenERP Server 5.0.1\n" "Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2009-05-19 14:36+0000\n" -"PO-Revision-Date: 2009-06-11 07:58+0000\n" +"POT-Creation-Date: 2009-06-16 13:04:51+0000\n" +"PO-Revision-Date: 2009-06-05 12:12+0000\n" "Last-Translator: Olivier (OpenERP) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2009-06-11 08:04+0000\n" +"Plural-Forms: \n" +"X-Launchpad-Export-Date: 2009-06-05 12:16+0000\n" "X-Generator: Launchpad (build Unknown)\n" #. module: point_of_sale @@ -40,6 +41,7 @@ msgstr "Transaction du Point de vente" #. module: point_of_sale #: wizard_view:pos.discount,init:0 +#: rml:pos.receipt:0 msgid "Discount :" msgstr "Remise :" @@ -89,6 +91,11 @@ msgstr "Commandes du jour" msgid "No Pricelist !" msgstr "Pas de Liste de Prix !" +#. module: point_of_sale +#: help:pos.order,user_id:0 +msgid "This is the logged in user (not necessarily the salesman)." +msgstr "C'est l'utilisateur connecté (pas necessairement le vendeur)." + #. module: point_of_sale #: wizard_view:pos.sale.get,init:0 msgid "Select an Open Sale Order" @@ -120,6 +127,12 @@ msgstr "Détail de la vente" msgid "Base" msgstr "Base" +#. module: point_of_sale +#: code:addons/point_of_sale/pos.py:0 +#, python-format +msgid "No Default Credit Account !" +msgstr "Aucun Compte de Crédit par défaut !" + #. module: point_of_sale #: wizard_view:pos.scan_product,init:0 msgid "Scan product" @@ -187,6 +200,8 @@ msgstr "Nombre d'Articles" #. module: point_of_sale #: code:addons/point_of_sale/report/pos_invoice.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.last.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.py:0 #, python-format msgid "Please create an invoice for this sale." msgstr "Veuillez créer une facture pour cette vente." @@ -223,6 +238,23 @@ msgstr "Dernier Colisage Sortant" msgid "Select default journals" msgstr "Sélectionnez le Journal par défaut" +#. module: point_of_sale +#: rml:pos.details:0 +#: rml:pos.receipt:0 +msgid "Qty" +msgstr "Qté" + +#. module: point_of_sale +#: code:addons/point_of_sale/pos.py:0 +#, python-format +msgid "You have to define a Default Debit Account for your Financial Journals!\n" +msgstr "Vous devez définir un Compte de Débit par défaut pour vos Journaux Financiers !\n" + +#. module: point_of_sale +#: field:pos.order,user_id:0 +msgid "Logged in User" +msgstr "Utilisateur connecté" + #. module: point_of_sale #: rml:pos.details:0 msgid "VAT(%)" @@ -258,6 +290,11 @@ msgstr "Scanner le code barre" msgid "Partner" msgstr "Partenaire" +#. module: point_of_sale +#: help:pos.order,salesman_id:0 +msgid "This is the salesman actually making the order." +msgstr "C'est le vendeur effectuant la commande." + #. module: point_of_sale #: field:pos.order,payments:0 msgid "Order Payments" @@ -269,9 +306,32 @@ msgid "Date :" msgstr "Date :" #. module: point_of_sale -#: rml:pos.receipt:0 -msgid "Disc :" -msgstr "Rem :" +#: view:pos.order:0 +msgid "Ma_ke Payment" +msgstr "Effectuer le paiement" + +#. module: point_of_sale +#: model:ir.module.module,description:point_of_sale.module_meta_information +msgid "\n" +"Main features :\n" +" - Fast encoding of the sale.\n" +" - Allow to choose one payment mode (the quick way) or to split the payment between several payment mode.\n" +" - Computation of the amount of money to return.\n" +" - Create and confirm picking list automatically.\n" +" - Allow the user to create invoice automatically.\n" +" - Allow to refund former sales.\n" +"\n" +" " +msgstr "\n" +"Principales fonctionalités :\n" +" - encodage rapide de la vente\n" +" - permet de choisir le mode de paiement (procédé rapide) ou de scinder le paiement entre plusieurs modes de paiement\n" +" - calcul du montant à retourner\n" +" - crée et confirme les listes de colisage automatiquement\n" +" - permet à l'utilisateur de créer la facture automatiquement\n" +" - permet le remboursement des ventes passées\n" +"\n" +" " #. module: point_of_sale #: model:ir.actions.wizard,name:point_of_sale.pos_confirm @@ -285,7 +345,6 @@ msgid "POS Orders" msgstr "Commandes Point de Vente" #. module: point_of_sale -#: rml:pos.invoice:0 #: rml:pos.lines:0 msgid "Disc. (%)" msgstr "Rem. (%)" @@ -328,10 +387,9 @@ msgid "Order Lines" msgstr "Lignes de la commande" #. module: point_of_sale -#: rml:pos.details:0 -#: rml:pos.receipt:0 -msgid "Qty" -msgstr "Qté" +#: rml:pos.invoice:0 +msgid "Disc.(%)" +msgstr "Rem.(%)" #. module: point_of_sale #: model:ir.module.module,shortdesc:point_of_sale.module_meta_information @@ -341,6 +399,8 @@ msgstr "Point de Vente" #. module: point_of_sale #: code:addons/point_of_sale/pos.py:0 #: code:addons/point_of_sale/report/pos_invoice.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.last.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.py:0 #, python-format msgid "Error !" msgstr "Erreur !" @@ -360,11 +420,6 @@ msgstr "Date de Création" msgid "PRO-FORMA" msgstr "PRO-FORMA" -#. module: point_of_sale -#: rml:pos.receipt:0 -msgid "Total :" -msgstr "Total :" - #. module: point_of_sale #: model:ir.ui.menu,name:point_of_sale.menu_point_rep msgid "Reporting" @@ -380,6 +435,11 @@ msgstr "Point de Vente " msgid "Point of Sale journal configuration." msgstr "Configuration des Journaux utilisés par les Points de Vente." +#. module: point_of_sale +#: rml:pos.receipt:0 +msgid "Total :" +msgstr "Total :" + #. module: point_of_sale #: code:addons/point_of_sale/pos.py:0 #, python-format @@ -412,6 +472,12 @@ msgstr "Obtenir à partir d'une commande" msgid "Configuration" msgstr "Configuration" +#. module: point_of_sale +#: code:addons/point_of_sale/pos.py:0 +#, python-format +msgid "Unable to create invoice (partner has no address)." +msgstr "Impossible de créer la facture (le partenaire n'a pas d'adresse)." + #. module: point_of_sale #: rml:pos.invoice:0 #: rml:pos.lines:0 @@ -429,6 +495,12 @@ msgstr "XML non valide pour l'architecture de la vue" msgid "POS Lines of the day" msgstr "Lignes du Point de Vente du Jour" +#. module: point_of_sale +#: code:addons/point_of_sale/pos.py:0 +#, python-format +msgid "No Default Debit Account !" +msgstr "Aucun Compte de Débit par défaut !" + #. module: point_of_sale #: field:pos.order,nb_print:0 msgid "Number of Print" @@ -497,7 +569,7 @@ msgid "Point of Sale" msgstr "Point de Vente" #. module: point_of_sale -#: field:pos.order,user_id:0 +#: field:pos.order,salesman_id:0 msgid "Salesman" msgstr "Vendeur" @@ -523,12 +595,15 @@ msgid "Wizard default journals" msgstr "Assistant des journaux par défaut" #. module: point_of_sale -#: view:pos.order:0 -msgid "Ma_ke Payment" -msgstr "Effectuer le paiement" +#: rml:pos.details:0 +#: rml:pos.details_summary:0 +msgid "Total of the day" +msgstr "Total du Jour" #. module: point_of_sale #: code:addons/point_of_sale/pos.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.last.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.py:0 #, python-format msgid "No order lines defined for this sale." msgstr "Aucune lignes de commande pour cette vente." @@ -590,11 +665,6 @@ msgstr "Veuillez fournir un partenaire pour cette vente." msgid "POS Order line" msgstr "Ligne de ticket" -#. module: point_of_sale -#: rml:pos.receipt:0 -msgid "." -msgstr "." - #. module: point_of_sale #: model:ir.actions.wizard,name:point_of_sale.pos_discount msgid "Discount" @@ -674,6 +744,8 @@ msgstr "Vous ne pouvez pas modifier cetee commande. Elle a déjà été payée" #. module: point_of_sale #: code:addons/point_of_sale/pos.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.last.py:0 +#: code:addons/point_of_sale/wizard/wizard_pos_payment.py:0 #, python-format msgid "Error" msgstr "Erreur" @@ -796,6 +868,12 @@ msgstr "Fermer" msgid "Order lines" msgstr "Lignes de commande" +#. module: point_of_sale +#: code:addons/point_of_sale/pos.py:0 +#, python-format +msgid "You have to define a Default Credit Account for your Financial Journals!\n" +msgstr "Vous devez définir un COmpte de Crédit par défaut pour vos Journaux Financiers !\n" + #. module: point_of_sale #: field:pos.order.line,order_id:0 #: field:pos.payment,order_id:0 @@ -809,17 +887,8 @@ msgstr "Ajouter un paiement :" #. module: point_of_sale #: constraint:ir.model:0 -msgid "" -"The Object name must start with x_ and not contain any special character !" -msgstr "" -"Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères " -"spéciaux !" - -#. module: point_of_sale -#: rml:pos.details:0 -#: rml:pos.details_summary:0 -msgid "Total of the day" -msgstr "Total du Jour" +msgid "The Object name must start with x_ and not contain any special character !" +msgstr "Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères spéciaux !" #. module: point_of_sale #: model:ir.model,name:point_of_sale.model_pos_payment @@ -870,11 +939,6 @@ msgstr "Produit" msgid "Invoicing" msgstr "Facturation" -#. module: point_of_sale -#: rml:pos.receipt:0 -msgid ":" -msgstr ":" - #. module: point_of_sale #: field:pos.config.journal,journal_id:0 #: field:pos.order,sale_journal:0 @@ -950,11 +1014,6 @@ msgstr "Remise" msgid "Date Ordered" msgstr "Date de Commande" -#. module: point_of_sale -#: rml:pos.receipt:0 -msgid "Ce bon est valide jusqu'au" -msgstr "Ce bon est valide jusqu'au" - #. module: point_of_sale #: view:pos.order:0 msgid "Payments" @@ -1051,3 +1110,4 @@ msgstr "Total" #: rml:pos.receipt:0 msgid "Price" msgstr "Prix" + diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index b6a4ddb56c0..4a0c1fce3e3 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -152,18 +152,18 @@ class pos_order(osv.osv): states={'draft': [('readonly', False)]}, readonly=True), 'shop_id': fields.many2one('sale.shop', 'Shop', required=True, states={'draft': [('readonly', False)]}, readonly=True), - 'date_order': fields.date('Date Ordered', readonly=True), + 'date_order': fields.datetime('Date Ordered', readonly=True), 'date_validity': fields.date('Validity Date', required=True), - 'user_id': fields.many2one('res.users', 'Salesman', - readonly=True), + 'user_id': fields.many2one('res.users', 'Logged in User', readonly=True, + help="This is the logged in user (not necessarily the salesman)."), + 'salesman_id': fields.many2one('res.users', 'Salesman', + help="This is the salesman actually making the order."), 'amount_tax': fields.function(_amount_tax, method=True, string='Taxes'), - 'amount_total': fields.function(_amount_total, method=True, - string='Total'), + 'amount_total': fields.function(_amount_total, method=True, string='Total'), 'amount_paid': fields.function(_total_payment, 'Paid', states={'draft': [('readonly', False)]}, readonly=True, method=True), - 'amount_return': fields.function(_total_return, 'Returned', - method=True), + 'amount_return': fields.function(_total_return, 'Returned', method=True), 'lines': fields.one2many('pos.order.line', 'order_id', 'Order Lines', states={'draft': [('readonly', False)]}, readonly=True), @@ -181,10 +181,8 @@ class pos_order(osv.osv): ('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced')], 'State', readonly=True, ), 'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True), - 'account_move': fields.many2one('account.move', 'Account Entry', - readonly=True), - 'pickings': fields.one2many('stock.picking', 'pos_order', 'Picking', - readonly=True), + 'account_move': fields.many2one('account.move', 'Account Entry', readonly=True), + 'pickings': fields.one2many('stock.picking', 'pos_order', 'Picking', readonly=True), 'last_out_picking': fields.many2one('stock.picking', 'Last Output Picking', readonly=True), @@ -211,7 +209,7 @@ class pos_order(osv.osv): 'state': lambda *a: 'draft', 'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence')\ .get(cr, uid, 'pos.order'), - 'date_order': lambda *a: time.strftime('%Y-%m-%d'), + 'date_order': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), 'date_validity': lambda *a: (DateTime.now() + DateTime.RelativeDateTime(months=+6)).strftime('%Y-%m-%d'), 'nb_print': lambda *a: 0, 'sale_journal': _sale_journal_get, @@ -417,9 +415,6 @@ class pos_order(osv.osv): def add_payment(self, cr, uid, order_id, data, context=None): """Create a new payment for the order""" - - print data - order = self.browse(cr, uid, order_id, context) if order.invoice_wanted and not order.partner_id: raise osv.except_osv(_('Error'), _('Cannot create invoice without a partner.')) diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index 6963fe31d61..62f048e23c3 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -11,6 +11,7 @@ + @@ -32,8 +33,8 @@ -