|
|
@ -66,6 +66,8 @@ class MisCashFlow(models.Model): |
|
|
|
|
|
|
|
@api.model_cr |
|
|
|
def init(self): |
|
|
|
account_type_receivable = self.env.ref( |
|
|
|
'account.data_account_type_receivable') |
|
|
|
query = """ |
|
|
|
SELECT |
|
|
|
-- we use negative id to avoid duplicates and we don't use |
|
|
@ -110,12 +112,11 @@ class MisCashFlow(models.Model): |
|
|
|
Null as reconciled, |
|
|
|
Null as full_reconcile_id, |
|
|
|
fl.company_id as company_id, |
|
|
|
-- we dont need this field on forecast lines |
|
|
|
Null as user_type_id, |
|
|
|
%i as user_type_id, |
|
|
|
fl.name as name, |
|
|
|
fl.date as date |
|
|
|
FROM mis_cash_flow_forecast_line as fl |
|
|
|
""" |
|
|
|
""" % account_type_receivable.id |
|
|
|
tools.drop_view_if_exists(self.env.cr, self._table) |
|
|
|
self._cr.execute( |
|
|
|
'CREATE OR REPLACE VIEW %s AS %s', |
|
|
|