2012/9/6 Cédric Krier <[email protected]>: > Still don't understand. > Why would you want to be able to similate an other datetime for now?
Why you designed today method? About Date field: http://doc.tryton.org/2.4/trytond/doc/ref/models/fields.html#date date_obj = Pool().get('ir.date') today = date_obj.today() date = vals.get('invoice_date') or today About Datetime field: http://doc.tryton.org/2.4/trytond/doc/ref/models/fields.html#datetime date_obj = Pool().get('ir.date') now = date_obj.now() date = vals.get('field_datetime') or now Buy now, you need: now = datetime.datetime.now() date = vals.get('field_datetime') or now if exist in ir.date today method (Date field), why not now method (DateTime field)? -- Si us plau, NO adjunti arxius a les seves respostes. Li preguem que integri el text al cos del missatge. Pot respondre usant NetEtiquete que li ajudarà a seguir la conversa. http://es.wikipedia.org/wiki/Netiquette Por favor, NO adjunte archivos a sus respuestas. Le rogamos que integre el texto en el cuerpo del mensaje. Puede responder usando NetEtiquete que le ayudará a seguir la conversación.http://es.wikipedia.org/wiki/Netiquette Please, DO NOT send attachment files with your answers, just copy and paste only the text you need to send into the body of your mails. Repply using NetEtiquete. http://en.wikipedia.org/wiki/Netiquette Raimon Esteve // Tryton - OpenERP :: Technical and consultor ERP // OpenERP e-sale / Magento OpenERP // AulaERP, formació online www.aulaerp.com www.zikzakmedia.com -- [email protected] mailing list
