تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2861 أدوات العرض

Example is here

please correct this code....


from odoo import api, fields, models, tools

class PosOrderReport(models.Model):
 _name = "report.pos.order"   

_description = "Point of Sale Orders Statistics"

_auto = False

_order = 'date desc'
date = fields.Datetime(string='Date Order', readonly=True)   

order_id = fields.Many2one('pos.order', string='Order', readonly=True)



@api.model_cr

def init(self):
 tools.drop_view_if_exists(self._cr, 'report_pos_order') 

self._cr.execute("""           

CREATE OR REPLACE VIEW report_pos_order AS (               

SELECT  

                

s.date_order AS date,

s.id as order_id,

s.date_order || s.id as order with date    # this is not working please any solution

FROM table s


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
ديسمبر 17
3965
0
نوفمبر 17
3074
1
يوليو 17
5427
0
مارس 17
2954
0
يناير 17
3155