vra (Tiny)
2009-06-17 19:31:14 +05:30
6 changed files with 133 additions and 78 deletions
+1 -4
View File
@@ -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 :
+107 -47
View File
@@ -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) <Unknown>\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"
+10 -15
View File
@@ -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.'))
+8 -7
View File
@@ -11,6 +11,7 @@
<page string="Order lines">
<field name="partner_id" on_change="onchange_partner_pricelist(partner_id)"/>
<field name="pricelist_id" domain="[('type','=','sale')]"/>
<field name="salesman_id" />
<field name="lines" colspan="4" nolabel="1">
<tree string="Order lines" editable="bottom">
<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,qty,parent.partner_id)" width="275"/>
@@ -32,8 +33,8 @@
<field name="amount_tax"/>
<field name="amount_total"/>
<button name="%(pos_discount)d"
string="D_iscount"
<button name="%(pos_add_product)d"
string="_Add product"
type="action" states="draft"/>
<button name="dummy_button"
@@ -47,8 +48,8 @@
<field name="state" select="2"/>
<button name="%(pos_add_product)d"
string="_Add product"
<button name="%(pos_discount)d"
string="D_iscount"
type="action" states="draft"/>
<button name="%(pos_payment)d"
@@ -96,7 +97,7 @@
<page string="Other">
<field name="shop_id" />
<field name="name" select="1"/>
<field name="date_order" select="1"/>
<field name="date_order" select="1" />
<field name="date_validity" />
<field name="user_id" />
@@ -119,7 +120,7 @@
<field name="res_model">pos.order</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_pos_pos_form"/>
<field name="domain">[ ('date_order','>=',time.strftime('%Y-%m-%d')) ]</field>
<field name="domain">[ ('date_order','>=',time.strftime('%Y-%m-%d 00:00:00')) ]</field>
</record>
@@ -175,7 +176,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_pos_order_tree"/>
<field name="domain">[('date_order','=', time.strftime('%Y-%m-%d'))]</field>
<field name="domain">[('date_order','=', time.strftime('%Y-%m-%d 00:00:00'))]</field>
</record>
<menuitem name="Orders of the day" parent="menu_point_ofsale" id="menu_action_pos_order_tree2" action="action_pos_order_tree2"/>
+4 -3
View File
@@ -33,9 +33,10 @@ class pos_invoice(report_sxw.rml_parse):
self.localcontext.update({
'time': time,
})
print
def preprocess(self, objects, data, ids):
super(pos_invoice, self).preprocess(objects, data, ids)
def set_context(self, objects, data, ids, report_type=None):
super(pos_invoice, self).set_context(objects, data, ids, report_type)
iids = []
nids = []
@@ -55,5 +56,5 @@ class pos_invoice(report_sxw.rml_parse):
self.localcontext['data'] = data
self.localcontext['objects'] = iids
report_sxw.report_sxw('report.pos.invoice', 'pos.order', 'addons/point_of_sale/report/pos_invoice.rml', parser= pos_invoice)
report_sxw.report_sxw('report.pos.invoice', 'pos.order', 'addons/account/report/invoice.rml', parser= pos_invoice)
+3 -2
View File
@@ -82,8 +82,9 @@
<para style="terp_default_Centre_9">[[ address and address.country_id.name ]]</para>
<para style="terp_default_Centre_9">Tel : [[ address and address.phone ]]</para>
<para style="terp_default_Centre_9">E-mail : [[ address and address.email ]]</para>
<para style="terp_default_Centre_9">User : [[ o.user_id.name ]]</para>
<para style="terp_default_Centre_9">Date : [[ time.strftime('%d/%m/%Y %H:%M') ]]</para>
<para style="terp_default_Centre_9">Salesman : [[ o.salesman_id.name ]]</para>
<para style="terp_default_Centre_9">Sale Date : [[ o.date_order ]]</para>
<para style="terp_default_Centre_9">Receipt Printing Date : [[ time.strftime('%d/%m/%Y %H:%M') ]]</para>
<para style="terp_default_Centre_9">
<font color="white"> </font>
</para>