From c71b512ea1608bec03bb982cd86d1a2f0ed5183a Mon Sep 17 00:00:00 2001 From: Haresh Chavda Date: Thu, 8 Feb 2018 10:04:47 +0530 Subject: [PATCH 01/14] [IMP] Remove unnecessary code --- addons/account_discount/models/account_invoice.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/account_discount/models/account_invoice.py b/addons/account_discount/models/account_invoice.py index 61be6c4c..3d269c77 100644 --- a/addons/account_discount/models/account_invoice.py +++ b/addons/account_discount/models/account_invoice.py @@ -117,8 +117,6 @@ class AccountInvoice(models.Model): @api.onchange('discount_amount') def onchange_discount_amount(self): - if self.discount_method == 'per': - return True values = self.get_maximum_per_amount() if self.discount < 0: raise Warning(_("Discount should be less than Gross Amount")) From eccbea79bbdd908b8034a2ad87b435193e48e749 Mon Sep 17 00:00:00 2001 From: kunjal patel Date: Thu, 8 Feb 2018 09:21:46 +0000 Subject: [PATCH 02/14] Scheduled failure Logs and keep days for email . --- addons/mail/data/mail_data.xml | 13 ++ addons/mail/models/mail_mail.py | 30 ++- addons/mail/models/mail_template.py | 16 ++ addons/mail/models/res_partner.py | 1 + addons/mail/static/src/img/flectra_o.png | Bin 556 -> 3259 bytes addons/mail/views/mail_mail_views.xml | 2 + addons/mail/views/mail_template_views.xml | 1 + addons/mail/wizard/mail_compose_message.py | 12 +- flectra/addons/base/ir/ir_cron.py | 32 ++- flectra/addons/base/ir/ir_cron_view.xml | 53 +++++ flectra/addons/base/ir/ir_mail_server.py | 1 + .../addons/base/ir/ir_mail_server_view.xml | 1 + .../addons/base/security/ir.model.access.csv | 201 +++++++++--------- 13 files changed, 257 insertions(+), 106 deletions(-) diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index ea7a1814..a2387160 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -13,6 +13,19 @@ + + Mail: Email Unlink + + code + model.process_email_unlink() + + 1 + days + -1 + + + + Publisher: Update Notification diff --git a/addons/mail/models/mail_mail.py b/addons/mail/models/mail_mail.py index 34654292..8465b599 100644 --- a/addons/mail/models/mail_mail.py +++ b/addons/mail/models/mail_mail.py @@ -50,12 +50,31 @@ class MailMail(models.Model): auto_delete = fields.Boolean( 'Auto Delete', help="Permanently delete this email after sending it, to save space") + keep_days = fields.Integer('Keep days', default=-1, + help="This value defines the no. of days " + "the emails should be recorded " + "in the system: \n -1 = Email will be deleted " + "immediately once it is send \n greater than 0 = Email " + "will be deleted after " + "the no. of days are met.") + delete_date = fields.Date(compute='_compute_delete_on_date', + string='Delete on.', store=True) failure_reason = fields.Text( 'Failure Reason', readonly=1, help="Failure reason. This is usually the exception thrown by the email server, stored to ease the debugging of mailing issues.") scheduled_date = fields.Char('Scheduled Send Date', help="If set, the queue manager will send the email after the date. If not set, the email will be send as soon as possible.") + @api.depends('keep_days') + def _compute_delete_on_date(self): + mail_date = fields.Datetime.from_string(self.date) + if self.keep_days > 0: + delete_on = mail_date + datetime.timedelta(days=self.keep_days) + self.delete_date = delete_on + else: + self.delete_date = mail_date.date() + + @api.model def create(self, values): # notification field: if not set, set if mail comes from an existing mail.message @@ -89,6 +108,12 @@ class MailMail(models.Model): def cancel(self): return self.write({'state': 'cancel'}) + + @api.model + def process_email_unlink(self): + mail_ids = self.sudo().search([('delete_date', '=', datetime.datetime.now().date())]) + mail_ids.filtered('auto_delete').unlink() + @api.model def process_email_queue(self, ids=None): """Send immediately queued messages, committing after each @@ -146,6 +171,8 @@ class MailMail(models.Model): 'email_status': 'exception', }) if mail_sent: + if self.keep_days > 0: + return True self.sudo().filtered(lambda self: self.auto_delete).unlink() return True @@ -254,7 +281,8 @@ class MailMail(models.Model): try: mail = self.browse(mail_id) if mail.state != 'outgoing': - if mail.state != 'exception' and mail.auto_delete: + if mail.state != 'exception' and mail.auto_delete and \ + mail.keep_days < 0: mail.sudo().unlink() continue # TDE note: remove me when model_id field is present on mail.message - done here to avoid doing it multiple times in the sub method diff --git a/addons/mail/models/mail_template.py b/addons/mail/models/mail_template.py index 1a297f9a..57209ee6 100644 --- a/addons/mail/models/mail_template.py +++ b/addons/mail/models/mail_template.py @@ -176,6 +176,13 @@ class MailTemplate(models.Model): help="You may attach files to this template, to be added to all " "emails created from this template") auto_delete = fields.Boolean('Auto Delete', default=True, help="Permanently delete this email after sending it, to save space") + keep_days = fields.Integer('Keep days', default=-1, + help="This value defines the no. of days " + "the emails should be recorded " + "in the system: \n -1 = Email will be deleted " + "immediately once it is send \n greater than 0 = Email " + "will be deleted after " + "the no. of days are met.") # Fake fields used to implement the placeholder assistant model_object_field = fields.Many2one('ir.model.fields', string="Field", @@ -201,6 +208,14 @@ class MailTemplate(models.Model): else: self.model = False + @api.onchange('mail_server_id') + def onchange_mail_server_id(self): + if self.mail_server_id and self.mail_server_id.keep_days > 0 \ + and self.keep_days < 0: + self.keep_days = self.mail_server_id.keep_days + else: + self.keep_days = -1 + def build_expression(self, field_name, sub_field_name, null_value): """Returns a placeholder expression for use in a template field, based on the values provided in the placeholder assistant. @@ -493,6 +508,7 @@ class MailTemplate(models.Model): values.update( mail_server_id=template.mail_server_id.id or False, auto_delete=template.auto_delete, + keep_days=template.keep_days, model=template.model, res_id=res_id or False, attachment_ids=[attach.id for attach in template.attachment_ids], diff --git a/addons/mail/models/res_partner.py b/addons/mail/models/res_partner.py index 8310acfe..e990b9ac 100644 --- a/addons/mail/models/res_partner.py +++ b/addons/mail/models/res_partner.py @@ -105,6 +105,7 @@ class Partner(models.Model): 'mail_message_id': message.id, 'mail_server_id': message.mail_server_id.id, 'auto_delete': self._context.get('mail_auto_delete', True), + 'keep_days': self._context.get('mail_keep_days', -1), 'references': references, } mail_values.update(custom_values) diff --git a/addons/mail/static/src/img/flectra_o.png b/addons/mail/static/src/img/flectra_o.png index d1839f6df41a5289173b44e8432fd10e79dd1201..b8223791d80921341ca2fbe0ecc62638ab53b9d5 100644 GIT binary patch literal 3259 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 T_Hwb**M1yeky|GkLQ{w)i_BHr zJ`)cDngdh}R50Q88QTNP{{R1f?bDlGFYh;BKc>HDe&or`PriLV@%EYb(KVlb|17<< zf8K-3Yo6RpKetosg`5J=*^DJYe!&b5&u)PHz?kIi?!wT)D(eB{a29w(7Bet#3xhBt z!>lJ#m)-61ytJV?MfZmC#QFZ0 zTo(y1_!8sgryZ?gljK~y)o7x|6FL2@zMSWhTmD8)Q4T3S(k$*BoY}2hQ+DJ + + diff --git a/addons/mail/views/mail_template_views.xml b/addons/mail/views/mail_template_views.xml index 6ce532c2..7394cf1b 100644 --- a/addons/mail/views/mail_template_views.xml +++ b/addons/mail/views/mail_template_views.xml @@ -67,6 +67,7 @@ + diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 3456def3..c8ef2759 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -117,6 +117,13 @@ class MailComposer(models.TransientModel): # mass mode options notify = fields.Boolean('Notify followers', help='Notify followers of the document (mass post only)') auto_delete = fields.Boolean('Delete Emails', help='Delete sent emails (mass mailing only)') + keep_days = fields.Integer('Keep days', default=-1, + help="This value defines the no. of days " + "the emails should be recorded " + "in the system: \n -1 = Email will be deleted " + "immediately once it is send \n greater than 0 = Email " + "will be deleted after " + "the no. of days are met.") auto_delete_message = fields.Boolean('Delete Message Copy', help='Do not keep a copy of the email in the document communication history (mass mailing only)') template_id = fields.Many2one( 'mail.template', 'Use template', index=True, @@ -220,7 +227,8 @@ class MailComposer(models.TransientModel): # template user_signature is added when generating body_html # mass mailing: use template auto_delete value -> note, for emails mass mailing only Mail = Mail.with_context(mail_notify_user_signature=False) - ActiveModel = ActiveModel.with_context(mail_notify_user_signature=False, mail_auto_delete=wizard.template_id.auto_delete) + ActiveModel = ActiveModel.with_context(mail_notify_user_signature=False, mail_auto_delete=wizard.template_id.auto_delete, + mail_keep_days=wizard.template_id.keep_days) if not hasattr(ActiveModel, 'message_post'): ActiveModel = self.env['mail.thread'].with_context(thread_model=wizard.model) if wizard.composition_mode == 'mass_post': @@ -305,6 +313,8 @@ class MailComposer(models.TransientModel): # auto deletion of mail_mail if self.auto_delete or self.template_id.auto_delete: mail_values['auto_delete'] = True + mail_values['keep_days'] = \ + self.keep_days or self.template_id.keep_days # rendered values using template email_dict = rendered_values[res_id] mail_values['partner_ids'] += email_dict.pop('partner_ids', []) diff --git a/flectra/addons/base/ir/ir_cron.py b/flectra/addons/base/ir/ir_cron.py index b200cdc8..f18f1745 100644 --- a/flectra/addons/base/ir/ir_cron.py +++ b/flectra/addons/base/ir/ir_cron.py @@ -53,7 +53,9 @@ class ir_cron(models.Model): cron_name = fields.Char('Name', related='ir_actions_server_id.name', store=True) user_id = fields.Many2one('res.users', string='Scheduler User', default=lambda self: self.env.user, required=True) active = fields.Boolean(default=True) + fail = fields.Boolean('Failer Log', default=True) interval_number = fields.Integer(default=1, help="Repeat every x.") + total_fail = fields.Integer('Total Fail') interval_type = fields.Selection([('minutes', 'Minutes'), ('hours', 'Hours'), ('days', 'Days'), @@ -76,14 +78,24 @@ class ir_cron(models.Model): return True @api.model - def _handle_callback_exception(self, cron_name, server_action_id, job_id, job_exception): + def _handle_callback_exception(self, cron_name, server_action_id, job_id, job_exception, cron_cr): """ Method called when an exception is raised by a job. Simply logs the exception and rollback the transaction. """ self._cr.rollback() + cron_id = self.browse(job_id) + if cron_id.fail: + self.env['ir.cronjob.logs'].create( + {'cron_status': 'fail', + 'name': cron_id.name + ' - ' + str(datetime.now().date()), + 'start_date': datetime.now(), + 'log': str(job_exception)}) + query = """UPDATE ir_cron set total_fail=%s where id=%s""" % ( + (cron_id.total_fail or 0) + 1, cron_id.id) + cron_cr.execute(query) @api.model - def _callback(self, cron_name, server_action_id, job_id): + def _callback(self, cron_name, server_action_id, job_id, cron_cr): """ Run the method associated to a given job. It takes care of logging and exception handling. Note that the user running the server action is the user calling this method. """ @@ -107,7 +119,7 @@ class ir_cron(models.Model): self.pool.reset_changes() _logger.exception("Call from cron %s for server action #%s failed in Job #%s", cron_name, server_action_id, job_id) - self._handle_callback_exception(cron_name, server_action_id, job_id, e) + self._handle_callback_exception(cron_name, server_action_id, job_id, e, cron_cr) @classmethod def _process_job(cls, job_cr, job, cron_cr): @@ -134,7 +146,7 @@ class ir_cron(models.Model): if numbercall > 0: numbercall -= 1 if not ok or job['doall']: - cron._callback(job['cron_name'], job['ir_actions_server_id'], job['id']) + cron._callback(job['cron_name'], job['ir_actions_server_id'], job['id'], cron_cr) if numbercall: nextcall += _intervalTypes[job['interval_type']](job['interval_number']) ok = True @@ -309,3 +321,15 @@ class ir_cron(models.Model): def toggle(self, model, domain): active = bool(self.env[model].search_count(domain)) return self.try_write({'active': active}) + + +class ScheduledLogs(models.Model): + _name = 'ir.cronjob.logs' + + name = fields.Char("Name", readonly=True, track_visibility='always') + object_name = fields.Char(string="Object", readonly=True, track_visibility='always') + start_date = fields.Datetime("Start Date", readonly=True) + cron_id = fields.Many2one("ir.cron", "Cron", readonly=True, track_visibility='always') + cron_status = fields.Selection([('fail', 'Fail'), ('success', 'Success')], + 'Status', readonly=True) + log = fields.Text("Logs", readonly=True, track_visibility='always') diff --git a/flectra/addons/base/ir/ir_cron_view.xml b/flectra/addons/base/ir/ir_cron_view.xml index 485370f8..86a30548 100644 --- a/flectra/addons/base/ir/ir_cron_view.xml +++ b/flectra/addons/base/ir/ir_cron_view.xml @@ -32,6 +32,10 @@ + + + + @@ -86,4 +90,53 @@ + + + ir.cronjob.logs.form + ir.cronjob.logs + primary + +
+ + + + + + + + + + + + + + + + +
+
+
+ + + ir.cronjob.logs.tree + ir.cronjob.logs + + + + + + + + + + + Scheduled Logs + ir.cronjob.logs + form + form,tree + + + + + diff --git a/flectra/addons/base/ir/ir_mail_server.py b/flectra/addons/base/ir/ir_mail_server.py index 8d3daa3a..26e005e3 100644 --- a/flectra/addons/base/ir/ir_mail_server.py +++ b/flectra/addons/base/ir/ir_mail_server.py @@ -149,6 +149,7 @@ class IrMailServer(models.Model): sequence = fields.Integer(string='Priority', default=10, help="When no specific mail server is requested for a mail, the highest priority one " "is used. Default priority is 10 (smaller number = higher priority)") active = fields.Boolean(default=True) + keep_days = fields.Integer('Keep days', default=-1) @api.multi def name_get(self): diff --git a/flectra/addons/base/ir/ir_mail_server_view.xml b/flectra/addons/base/ir/ir_mail_server_view.xml index 1999618f..7679641a 100644 --- a/flectra/addons/base/ir/ir_mail_server_view.xml +++ b/flectra/addons/base/ir/ir_mail_server_view.xml @@ -14,6 +14,7 @@ + diff --git a/flectra/addons/base/security/ir.model.access.csv b/flectra/addons/base/security/ir.model.access.csv index 13e07e1a..21b71acc 100644 --- a/flectra/addons/base/security/ir.model.access.csv +++ b/flectra/addons/base/security/ir.model.access.csv @@ -1,100 +1,101 @@ -"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_ir_attachment_all","ir_attachment all","model_ir_attachment",,1,0,0,0 -"access_ir_attachment_group_user","ir_attachment group_user","model_ir_attachment","group_user",1,1,1,1 -"access_ir_attachment_portal","ir.attachment.portal","model_ir_attachment","group_portal",1,0,1,0 -"access_ir_cron_group_cron","ir_cron group_cron","model_ir_cron","group_system",1,1,1,1 -"access_ir_exports_group_system","ir_exports group_system","model_ir_exports","base.group_user",1,1,1,1 -"access_ir_exports_line_group_system","ir_exports_line group_system","model_ir_exports_line","base.group_user",1,1,1,1 -"access_ir_model_group_erp_manager","ir_model group_erp_manager","model_ir_model","group_erp_manager",1,1,1,1 -"access_ir_model_constraint_group_erp_manager","ir_model_constraint group_erp_manager","model_ir_model_constraint","group_erp_manager",1,1,1,1 -"access_ir_model_relation_group_erp_manager","ir_model_relation group_erp_manager","model_ir_model_relation","group_erp_manager",1,1,1,1 -"access_ir_model_access_group_erp_manager","ir_model_access_group_erp_manager","model_ir_model_access","group_erp_manager",1,1,1,1 -"access_ir_model_data_group_erp_manager","ir_model_data group_erp_manager","model_ir_model_data","group_erp_manager",1,1,1,1 -"access_ir_model_fields_group_erp_manager","ir_model_fields group_erp_manager","model_ir_model_fields","group_erp_manager",1,1,1,1 -"access_ir_model_user","ir_model_all","model_ir_model",base.group_user,1,0,0,0 -"access_ir_model_data_user","ir_model_data user","model_ir_model_data",base.group_user,1,0,1,0 -"access_ir_model_fields_user","ir_model_fields all","model_ir_model_fields",base.group_user,1,0,0,0 -"access_ir_module_category_group_user","ir_module_category group_user","model_ir_module_category","group_erp_manager",1,0,0,0 -"access_ir_module_module_group_user","ir_module_module group_user","model_ir_module_module","group_system",1,1,1,1 -"access_ir_module_module_dependency_group_system","ir_module_module_dependency group_system","model_ir_module_module_dependency","group_system",1,1,1,1 -"access_ir_module_module_exclusion_group_system","ir_module_module_exclusion group_system","model_ir_module_module_exclusion","group_system",1,1,1,1 -"access_ir_property_group_user","ir_property group_user","model_ir_property",,1,0,0,0 -"access_ir_property_group_user_manager","ir_property group_manager","model_ir_property","base.group_partner_manager",1,1,1,0 -"access_ir_rule_group_erp_manager","ir_rule group_erp_manager","model_ir_rule","group_erp_manager",1,1,1,1 -"access_ir_sequence_group_user","ir_sequence group_user","model_ir_sequence","group_user",1,0,0,0 -"access_ir_sequence_group_system","ir_sequence group_system","model_ir_sequence","group_system",1,1,1,1 -"access_ir_sequence_date_range_group_user","ir_sequence_date_range group_user","model_ir_sequence_date_range","group_user",1,0,0,0 -"access_ir_sequence_date_range_group_system","ir_sequence_date_range group_system","model_ir_sequence_date_range","group_system",1,1,1,1 -"access_ir_translation_all","ir_translation all","model_ir_translation","group_user",1,1,1,1 -"access_ir_translation_group_system","ir_translation group_system","model_ir_translation","group_system",1,1,1,1 -"access_ir_ui_menu_group_user","ir_ui_menu group_user","model_ir_ui_menu",base.group_user,1,0,0,0 -"access_ir_ui_menu_group_system","ir_ui_menu group_system","model_ir_ui_menu","group_system",1,1,1,1 -"access_ir_ui_view_group_user","ir_ui_view group_user","model_ir_ui_view",,1,0,0,0 -"access_ir_ui_view_group_system","ir_ui_view group_system","model_ir_ui_view","group_system",1,1,1,1 -"access_ir_ui_view_custom_group_user","ir_ui_view_custom_group_user","model_ir_ui_view_custom",,1,1,1,1 -"access_ir_default_all","ir_default all","model_ir_default",,1,0,0,0 -"access_ir_default_group_user","ir_default group_user","model_ir_default","group_user",1,1,1,1 -"access_ir_default_group_system","ir_default group_system","model_ir_default","group_system",1,1,1,1 -"access_res_company_group_erp_manager","res_company group_erp_manager","model_res_company","group_erp_manager",1,1,1,1 -"access_res_company_group_user","res_company group_user","model_res_company",,1,0,0,0 -"access_res_country_group_all","res_country group_user_all","model_res_country",,1,0,0,0 -"access_res_country_state_group_all","res_country_state group_user_all","model_res_country_state",,1,0,0,0 -"access_res_country_group_group_all","res_country_group group_user_all","model_res_country_group",,1,0,0,0 -"access_res_country_group_user","res_country group_user","model_res_country","group_partner_manager",1,1,1,1 -"access_res_country_state_group_user","res_country_state group_user","model_res_country_state","group_partner_manager",1,1,1,1 -"access_res_country_group_group_user","res_country_group group_user","model_res_country_group","group_partner_manager",1,1,1,1 -"access_res_currency_group_all","res_currency group_all","model_res_currency",,1,0,0,0 -"access_res_currency_rate_group_all","res_currency_rate group_all","model_res_currency_rate",,1,0,0,0 -"access_res_currency_group_system","res_currency group_system","model_res_currency","group_system",1,1,1,1 -"access_res_currency_rate_group_system","res_currency_rate group_system","model_res_currency_rate","group_system",1,1,1,1 -"access_res_groups_group_erp_manager","res_groups group_erp_manager","model_res_groups","group_erp_manager",1,1,1,1 -"access_res_groups_group_user","res_groups group_user","model_res_groups",group_user,1,0,0,0 -"access_res_lang_group_all","res_lang group_all","model_res_lang",,1,0,0,0 -"access_res_lang_group_user","res_lang group_user","model_res_lang","group_system",1,1,1,1 -"access_res_partner_public","res_partner group_public","model_res_partner","group_public",1,0,0,0 -"access_res_partner_portal","res_partner group_portal","model_res_partner","group_portal",1,0,0,0 -"access_res_partner_group_partner_manager","res_partner group_partner_manager","model_res_partner","group_partner_manager",1,1,1,1 -"access_res_partner_group_user","res_partner group_user","model_res_partner","group_user",1,0,0,0 -"access_res_partner_bank_group_user","res_partner_bank group_user","model_res_partner_bank","group_user",1,0,0,0 -"access_res_partner_bank_group_partner_manager","res_partner_bank group_partner_manager","model_res_partner_bank","group_partner_manager",1,1,1,1 -"access_res_partner_category_group_user","res_partner_category group_user","model_res_partner_category","group_user",1,0,0,0 -"access_res_partner_category_group_partner_manager","res_partner_category group_partner_manager","model_res_partner_category","group_partner_manager",1,1,1,1 -"access_res_partner_industry_group_user","res_partner_industry group_user","model_res_partner_industry","group_user",1,0,0,0 -"access_res_partner_industry_group_system","res_partner_industry group_system","model_res_partner_industry","group_system",1,1,1,1 -"access_res_partner_title_group_user","res_partner_title group_user","model_res_partner_title","group_partner_manager",1,1,1,1 -"access_res_partner_title_group_partner_manager","res_partner_title group_partner_manager","model_res_partner_title",,1,0,0,0 -"access_res_request_link_group_system","res_request_link group_system","model_res_request_link","group_system",1,1,1,1 -"access_res_request_link_group_user","res_request_link group_user","model_res_request_link",,1,0,0,0 -"access_res_users_all","res_users all","model_res_users",,1,0,0,0 -"access_res_users_group_erp_manager","res_users group_erp_manager","model_res_users","group_erp_manager",1,1,1,1 -"access_res_users_log_all","res_users_log_all","model_res_users_log",,1,0,1,0 -"access_ir_actions_all","ir_actions_all","model_ir_actions_actions",,1,0,0,0 -"access_ir_actions_group_system","ir_actions_group_system","model_ir_actions_actions","group_system",1,1,1,1 -"access_ir_actions_act_window_all","ir_actions_act_window_all","model_ir_actions_act_window",,1,0,0,0 -"access_ir_actions_act_window_system","ir_actions_act_window_system","model_ir_actions_act_window","group_system",1,1,1,1 -"access_ir_actions_act_window_close_all","ir_actions_act_window_close_all","model_ir_actions_act_window_close",,1,0,0,0 -"access_ir_actions_act_window_close_group_system","ir_actions_act_window_close_group_system","model_ir_actions_act_window_close","group_system",1,1,1,1 -"access_ir_actions_report_all","ir_actions_report","model_ir_actions_report",,1,0,0,0 -"access_ir_actions_report_group_system","ir_actions_report_group_system","model_ir_actions_report","group_system",1,1,1,1 -"access_ir_actions_todo_group_system","ir_actions_todo group system","model_ir_actions_todo","group_system",1,1,1,1 -"access_ir_actions_act_window_view_all","ir_actions_act_window_view_all","model_ir_actions_act_window_view",,1,0,0,0 -"access_ir_actions_act_window_view_group_system","ir_actions_act_window_view_group_system","model_ir_actions_act_window_view","group_system",1,1,1,1 -"access_ir_actions_act_url_all","ir_actions_act_url_all","model_ir_actions_act_url",,1,0,0,0 -"access_ir_actions_act_url_group_system","ir_actions_act_url_group_system","model_ir_actions_act_url","group_system",1,1,1,1 -"access_ir_server_object_lines_all","ir_server_object_lines_all","model_ir_server_object_lines",,1,0,0,0 -"access_ir_server_object_lines_group_system","ir_server_object_lines_group_system","model_ir_server_object_lines","group_system",1,1,1,1 -"access_ir_actions_server_all","ir_actions_server_all","model_ir_actions_server",,1,0,0,0 -"access_ir_actions_server_group_system","ir_actions_server_group_system","model_ir_actions_server","group_system",1,1,1,1 -"access_res_bank_group_system","res_bank_group_system","model_res_bank","group_system",1,1,1,1 -"access_res_bank_group_partner_manager","res_bank_group_partner_manager","model_res_bank","group_partner_manager",1,1,1,1 -"access_res_bank_user","res_bank user","model_res_bank","group_user",1,0,0,0 -"access_ir_filter_erp_manager","ir_filters all","model_ir_filters","group_erp_manager",1,1,1,1 -"access_ir_filter_user","ir_filters all","model_ir_filters","group_user",1,1,1,1 -"access_ir_filter_portal","ir_filters all","model_ir_filters","group_portal",1,1,1,1 -"access_ir_filter_public","ir_filters all","model_ir_filters","group_public",1,1,1,1 -"access_ir_config_parameter_system","ir_config_parameter_system","model_ir_config_parameter","group_system",1,1,1,1 -"access_ir_mail_server","ir_mail_server","model_ir_mail_server","group_system",1,1,1,1 -"access_ir_actions_client","ir_actions_client all","model_ir_actions_client",,1,0,0,0 -"access_ir_logging","ir_logging admin","model_ir_logging","group_erp_manager",1,1,1,1 -"paperformat_access_portal","ir_actions_report_paperformat group_portal","model_report_paperformat",,1,0,0,0 -"paperformat_access_employee","ir_actions_report_paperformat group_hr_user","model_report_paperformat",,1,0,1,0 +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_ir_attachment_all,ir_attachment all,model_ir_attachment,,1,0,0,0 +access_ir_attachment_group_user,ir_attachment group_user,model_ir_attachment,group_user,1,1,1,1 +access_ir_attachment_portal,ir.attachment.portal,model_ir_attachment,group_portal,1,0,1,0 +access_ir_cron_group_cron,ir_cron group_cron,model_ir_cron,group_system,1,1,1,1 +access_ir_exports_group_system,ir_exports group_system,model_ir_exports,base.group_user,1,1,1,1 +access_ir_exports_line_group_system,ir_exports_line group_system,model_ir_exports_line,base.group_user,1,1,1,1 +access_ir_model_group_erp_manager,ir_model group_erp_manager,model_ir_model,group_erp_manager,1,1,1,1 +access_ir_model_constraint_group_erp_manager,ir_model_constraint group_erp_manager,model_ir_model_constraint,group_erp_manager,1,1,1,1 +access_ir_model_relation_group_erp_manager,ir_model_relation group_erp_manager,model_ir_model_relation,group_erp_manager,1,1,1,1 +access_ir_model_access_group_erp_manager,ir_model_access_group_erp_manager,model_ir_model_access,group_erp_manager,1,1,1,1 +access_ir_model_data_group_erp_manager,ir_model_data group_erp_manager,model_ir_model_data,group_erp_manager,1,1,1,1 +access_ir_model_fields_group_erp_manager,ir_model_fields group_erp_manager,model_ir_model_fields,group_erp_manager,1,1,1,1 +access_ir_model_user,ir_model_all,model_ir_model,base.group_user,1,0,0,0 +access_ir_model_data_user,ir_model_data user,model_ir_model_data,base.group_user,1,0,1,0 +access_ir_model_fields_user,ir_model_fields all,model_ir_model_fields,base.group_user,1,0,0,0 +access_ir_module_category_group_user,ir_module_category group_user,model_ir_module_category,group_erp_manager,1,0,0,0 +access_ir_module_module_group_user,ir_module_module group_user,model_ir_module_module,group_system,1,1,1,1 +access_ir_module_module_dependency_group_system,ir_module_module_dependency group_system,model_ir_module_module_dependency,group_system,1,1,1,1 +access_ir_module_module_exclusion_group_system,ir_module_module_exclusion group_system,model_ir_module_module_exclusion,group_system,1,1,1,1 +access_ir_property_group_user,ir_property group_user,model_ir_property,,1,0,0,0 +access_ir_property_group_user_manager,ir_property group_manager,model_ir_property,base.group_partner_manager,1,1,1,0 +access_ir_rule_group_erp_manager,ir_rule group_erp_manager,model_ir_rule,group_erp_manager,1,1,1,1 +access_ir_sequence_group_user,ir_sequence group_user,model_ir_sequence,group_user,1,0,0,0 +access_ir_sequence_group_system,ir_sequence group_system,model_ir_sequence,group_system,1,1,1,1 +access_ir_sequence_date_range_group_user,ir_sequence_date_range group_user,model_ir_sequence_date_range,group_user,1,0,0,0 +access_ir_sequence_date_range_group_system,ir_sequence_date_range group_system,model_ir_sequence_date_range,group_system,1,1,1,1 +access_ir_translation_all,ir_translation all,model_ir_translation,group_user,1,1,1,1 +access_ir_translation_group_system,ir_translation group_system,model_ir_translation,group_system,1,1,1,1 +access_ir_ui_menu_group_user,ir_ui_menu group_user,model_ir_ui_menu,base.group_user,1,0,0,0 +access_ir_ui_menu_group_system,ir_ui_menu group_system,model_ir_ui_menu,group_system,1,1,1,1 +access_ir_ui_view_group_user,ir_ui_view group_user,model_ir_ui_view,,1,0,0,0 +access_ir_ui_view_group_system,ir_ui_view group_system,model_ir_ui_view,group_system,1,1,1,1 +access_ir_ui_view_custom_group_user,ir_ui_view_custom_group_user,model_ir_ui_view_custom,,1,1,1,1 +access_ir_default_all,ir_default all,model_ir_default,,1,0,0,0 +access_ir_default_group_user,ir_default group_user,model_ir_default,group_user,1,1,1,1 +access_ir_default_group_system,ir_default group_system,model_ir_default,group_system,1,1,1,1 +access_res_company_group_erp_manager,res_company group_erp_manager,model_res_company,group_erp_manager,1,1,1,1 +access_res_company_group_user,res_company group_user,model_res_company,,1,0,0,0 +access_res_country_group_all,res_country group_user_all,model_res_country,,1,0,0,0 +access_res_country_state_group_all,res_country_state group_user_all,model_res_country_state,,1,0,0,0 +access_res_country_group_group_all,res_country_group group_user_all,model_res_country_group,,1,0,0,0 +access_res_country_group_user,res_country group_user,model_res_country,group_partner_manager,1,1,1,1 +access_res_country_state_group_user,res_country_state group_user,model_res_country_state,group_partner_manager,1,1,1,1 +access_res_country_group_group_user,res_country_group group_user,model_res_country_group,group_partner_manager,1,1,1,1 +access_res_currency_group_all,res_currency group_all,model_res_currency,,1,0,0,0 +access_res_currency_rate_group_all,res_currency_rate group_all,model_res_currency_rate,,1,0,0,0 +access_res_currency_group_system,res_currency group_system,model_res_currency,group_system,1,1,1,1 +access_res_currency_rate_group_system,res_currency_rate group_system,model_res_currency_rate,group_system,1,1,1,1 +access_res_groups_group_erp_manager,res_groups group_erp_manager,model_res_groups,group_erp_manager,1,1,1,1 +access_res_groups_group_user,res_groups group_user,model_res_groups,group_user,1,0,0,0 +access_res_lang_group_all,res_lang group_all,model_res_lang,,1,0,0,0 +access_res_lang_group_user,res_lang group_user,model_res_lang,group_system,1,1,1,1 +access_res_partner_public,res_partner group_public,model_res_partner,group_public,1,0,0,0 +access_res_partner_portal,res_partner group_portal,model_res_partner,group_portal,1,0,0,0 +access_res_partner_group_partner_manager,res_partner group_partner_manager,model_res_partner,group_partner_manager,1,1,1,1 +access_res_partner_group_user,res_partner group_user,model_res_partner,group_user,1,0,0,0 +access_res_partner_bank_group_user,res_partner_bank group_user,model_res_partner_bank,group_user,1,0,0,0 +access_res_partner_bank_group_partner_manager,res_partner_bank group_partner_manager,model_res_partner_bank,group_partner_manager,1,1,1,1 +access_res_partner_category_group_user,res_partner_category group_user,model_res_partner_category,group_user,1,0,0,0 +access_res_partner_category_group_partner_manager,res_partner_category group_partner_manager,model_res_partner_category,group_partner_manager,1,1,1,1 +access_res_partner_industry_group_user,res_partner_industry group_user,model_res_partner_industry,group_user,1,0,0,0 +access_res_partner_industry_group_system,res_partner_industry group_system,model_res_partner_industry,group_system,1,1,1,1 +access_res_partner_title_group_user,res_partner_title group_user,model_res_partner_title,group_partner_manager,1,1,1,1 +access_res_partner_title_group_partner_manager,res_partner_title group_partner_manager,model_res_partner_title,,1,0,0,0 +access_res_request_link_group_system,res_request_link group_system,model_res_request_link,group_system,1,1,1,1 +access_res_request_link_group_user,res_request_link group_user,model_res_request_link,,1,0,0,0 +access_res_users_all,res_users all,model_res_users,,1,0,0,0 +access_res_users_group_erp_manager,res_users group_erp_manager,model_res_users,group_erp_manager,1,1,1,1 +access_res_users_log_all,res_users_log_all,model_res_users_log,,1,0,1,0 +access_ir_actions_all,ir_actions_all,model_ir_actions_actions,,1,0,0,0 +access_ir_actions_group_system,ir_actions_group_system,model_ir_actions_actions,group_system,1,1,1,1 +access_ir_actions_act_window_all,ir_actions_act_window_all,model_ir_actions_act_window,,1,0,0,0 +access_ir_actions_act_window_system,ir_actions_act_window_system,model_ir_actions_act_window,group_system,1,1,1,1 +access_ir_actions_act_window_close_all,ir_actions_act_window_close_all,model_ir_actions_act_window_close,,1,0,0,0 +access_ir_actions_act_window_close_group_system,ir_actions_act_window_close_group_system,model_ir_actions_act_window_close,group_system,1,1,1,1 +access_ir_actions_report_all,ir_actions_report,model_ir_actions_report,,1,0,0,0 +access_ir_actions_report_group_system,ir_actions_report_group_system,model_ir_actions_report,group_system,1,1,1,1 +access_ir_actions_todo_group_system,ir_actions_todo group system,model_ir_actions_todo,group_system,1,1,1,1 +access_ir_actions_act_window_view_all,ir_actions_act_window_view_all,model_ir_actions_act_window_view,,1,0,0,0 +access_ir_actions_act_window_view_group_system,ir_actions_act_window_view_group_system,model_ir_actions_act_window_view,group_system,1,1,1,1 +access_ir_actions_act_url_all,ir_actions_act_url_all,model_ir_actions_act_url,,1,0,0,0 +access_ir_actions_act_url_group_system,ir_actions_act_url_group_system,model_ir_actions_act_url,group_system,1,1,1,1 +access_ir_server_object_lines_all,ir_server_object_lines_all,model_ir_server_object_lines,,1,0,0,0 +access_ir_server_object_lines_group_system,ir_server_object_lines_group_system,model_ir_server_object_lines,group_system,1,1,1,1 +access_ir_actions_server_all,ir_actions_server_all,model_ir_actions_server,,1,0,0,0 +access_ir_actions_server_group_system,ir_actions_server_group_system,model_ir_actions_server,group_system,1,1,1,1 +access_res_bank_group_system,res_bank_group_system,model_res_bank,group_system,1,1,1,1 +access_res_bank_group_partner_manager,res_bank_group_partner_manager,model_res_bank,group_partner_manager,1,1,1,1 +access_res_bank_user,res_bank user,model_res_bank,group_user,1,0,0,0 +access_ir_filter_erp_manager,ir_filters all,model_ir_filters,group_erp_manager,1,1,1,1 +access_ir_filter_user,ir_filters all,model_ir_filters,group_user,1,1,1,1 +access_ir_filter_portal,ir_filters all,model_ir_filters,group_portal,1,1,1,1 +access_ir_filter_public,ir_filters all,model_ir_filters,group_public,1,1,1,1 +access_ir_config_parameter_system,ir_config_parameter_system,model_ir_config_parameter,group_system,1,1,1,1 +access_ir_mail_server,ir_mail_server,model_ir_mail_server,group_system,1,1,1,1 +access_ir_actions_client,ir_actions_client all,model_ir_actions_client,,1,0,0,0 +access_ir_logging,ir_logging admin,model_ir_logging,group_erp_manager,1,1,1,1 +paperformat_access_portal,ir_actions_report_paperformat group_portal,model_report_paperformat,,1,0,0,0 +paperformat_access_employee,ir_actions_report_paperformat group_hr_user,model_report_paperformat,,1,0,1,0 +access_ir_cronjob_logs,access_ir_cronjob_logs,model_ir_cronjob_logs,group_system,1,1,1,1 From ef8fc58c3c69fec5e467621609b5f1af377ce740 Mon Sep 17 00:00:00 2001 From: Haresh Chavda Date: Fri, 9 Feb 2018 11:34:22 +0530 Subject: [PATCH 03/14] [IMP] Check condition if gross amount exists --- addons/account_discount/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_discount/models/account_invoice.py b/addons/account_discount/models/account_invoice.py index 3d269c77..58909769 100644 --- a/addons/account_discount/models/account_invoice.py +++ b/addons/account_discount/models/account_invoice.py @@ -121,7 +121,7 @@ class AccountInvoice(models.Model): if self.discount < 0: raise Warning(_("Discount should be less than Gross Amount")) discount = self.discount or self.discount_amount - if discount > self.gross_amount: + if self.gross_amount and discount > self.gross_amount: raise Warning(_("Discount (%s) should be less than " "Gross Amount (%s).") % ( formatLang(self.env, discount, digits=2), From 637e7edc2b03f0c6f643f4b032f1b7d0f3bf84ce Mon Sep 17 00:00:00 2001 From: Flectra Date: Sun, 11 Feb 2018 23:55:56 -0800 Subject: [PATCH 04/14] [FIX] doc --- doc/Makefile | 4 +- doc/_extensions/autojsdoc/README.rst | 4 +- doc/_extensions/autojsdoc/parser/parser.py | 12 +- .../autojsdoc/parser/tests/README.rst | 2 +- .../autojsdoc/parser/tests/test_class.py | 24 +- .../autojsdoc/parser/tests/test_crap.py | 16 +- .../autojsdoc/parser/tests/test_module.py | 28 +- .../autojsdoc/parser/tests/test_namespace.py | 22 +- .../{odoo_ext => flectra_ext}/__init__.py | 12 +- .../breadcrumb_list.html | 0 .../{odoo_ext => flectra_ext}/layout.html | 134 ++++---- .../pygments_override.py | 6 +- .../static/aside.less | 0 .../static/bootstrap-3.3.6/less/alerts.less | 0 .../static/bootstrap-3.3.6/less/badges.less | 0 .../bootstrap-3.3.6/less/bootstrap.less | 0 .../bootstrap-3.3.6/less/breadcrumbs.less | 0 .../bootstrap-3.3.6/less/button-groups.less | 0 .../static/bootstrap-3.3.6/less/buttons.less | 0 .../static/bootstrap-3.3.6/less/carousel.less | 0 .../static/bootstrap-3.3.6/less/close.less | 0 .../static/bootstrap-3.3.6/less/code.less | 0 .../less/component-animations.less | 0 .../bootstrap-3.3.6/less/dropdowns.less | 0 .../static/bootstrap-3.3.6/less/forms.less | 0 .../bootstrap-3.3.6/less/glyphicons.less | 0 .../static/bootstrap-3.3.6/less/grid.less | 0 .../bootstrap-3.3.6/less/input-groups.less | 0 .../bootstrap-3.3.6/less/jumbotron.less | 0 .../static/bootstrap-3.3.6/less/labels.less | 0 .../bootstrap-3.3.6/less/list-group.less | 0 .../static/bootstrap-3.3.6/less/media.less | 0 .../static/bootstrap-3.3.6/less/mixins.less | 0 .../bootstrap-3.3.6/less/mixins/alerts.less | 0 .../less/mixins/background-variant.less | 0 .../less/mixins/border-radius.less | 0 .../bootstrap-3.3.6/less/mixins/buttons.less | 0 .../less/mixins/center-block.less | 0 .../bootstrap-3.3.6/less/mixins/clearfix.less | 0 .../bootstrap-3.3.6/less/mixins/forms.less | 0 .../less/mixins/gradients.less | 0 .../less/mixins/grid-framework.less | 0 .../bootstrap-3.3.6/less/mixins/grid.less | 0 .../less/mixins/hide-text.less | 0 .../bootstrap-3.3.6/less/mixins/image.less | 0 .../bootstrap-3.3.6/less/mixins/labels.less | 0 .../less/mixins/list-group.less | 0 .../less/mixins/nav-divider.less | 0 .../less/mixins/nav-vertical-align.less | 0 .../bootstrap-3.3.6/less/mixins/opacity.less | 0 .../less/mixins/pagination.less | 0 .../bootstrap-3.3.6/less/mixins/panels.less | 0 .../less/mixins/progress-bar.less | 0 .../less/mixins/reset-filter.less | 0 .../less/mixins/reset-text.less | 0 .../bootstrap-3.3.6/less/mixins/resize.less | 0 .../less/mixins/responsive-visibility.less | 0 .../bootstrap-3.3.6/less/mixins/size.less | 0 .../less/mixins/tab-focus.less | 0 .../less/mixins/table-row.less | 0 .../less/mixins/text-emphasis.less | 0 .../less/mixins/text-overflow.less | 0 .../less/mixins/vendor-prefixes.less | 0 .../static/bootstrap-3.3.6/less/modals.less | 0 .../static/bootstrap-3.3.6/less/navbar.less | 0 .../static/bootstrap-3.3.6/less/navs.less | 0 .../bootstrap-3.3.6/less/normalize.less | 0 .../static/bootstrap-3.3.6/less/pager.less | 0 .../bootstrap-3.3.6/less/pagination.less | 0 .../static/bootstrap-3.3.6/less/panels.less | 0 .../static/bootstrap-3.3.6/less/popovers.less | 0 .../static/bootstrap-3.3.6/less/print.less | 0 .../bootstrap-3.3.6/less/progress-bars.less | 0 .../less/responsive-embed.less | 0 .../less/responsive-utilities.less | 0 .../bootstrap-3.3.6/less/scaffolding.less | 0 .../static/bootstrap-3.3.6/less/tables.less | 0 .../static/bootstrap-3.3.6/less/theme.less | 0 .../bootstrap-3.3.6/less/thumbnails.less | 0 .../static/bootstrap-3.3.6/less/tooltip.less | 0 .../static/bootstrap-3.3.6/less/type.less | 0 .../bootstrap-3.3.6/less/utilities.less | 0 .../bootstrap-3.3.6/less/variables.less | 0 .../static/bootstrap-3.3.6/less/wells.less | 0 .../static/bootstrap.css.map | 0 .../static/bootstrap.js | 0 .../static/components.less | 0 .../{odoo_ext => flectra_ext}/static/doc.js | 0 .../static/fonts/Material-Design-Icons.eot | Bin .../static/fonts/Material-Design-Icons.svg | 0 .../static/fonts/Material-Design-Icons.ttf | Bin .../static/fonts/Material-Design-Icons.woff | Bin .../static/footer.less | 2 +- .../static/header.less | 8 +- .../static/img/2x_apps_families_s.png | Bin .../static/img/apps_families_s.png | Bin .../static/img/banner_bg.png | Bin .../static/img/geometric_gradient.png | Bin .../static/img/github-square_32.png | Bin .../static/img/logos/odoo_logo.png | Bin .../static/img/logos/odoo_logo.svg | 8 +- .../static/img/logos/odoo_logo_small.png | Bin .../static/img/odoo_logo_rgb.png | Bin .../static/img/odoo_logo_white.png | Bin .../static/index.less | 0 .../static/jquery.min.js | 0 .../static/jquery.noconflict.js | 0 .../static/layout.less | 0 .../{odoo_ext => flectra_ext}/static/mdi.less | 0 .../static/mixins.less | 2 +- .../static/print.less | 0 .../static/style.css | 8 +- .../static/style.less | 2 +- .../static/typography.less | 0 .../static/variables.less | 14 +- .../flectra_ext/sub-menu_list.html | 9 + .../{odoo_ext => flectra_ext}/switcher.py | 0 .../switchers_list.html | 0 .../{odoo_ext => flectra_ext}/theme.conf | 2 +- .../{odoo_ext => flectra_ext}/translator.py | 8 +- doc/_extensions/github_link.py | 6 +- doc/_extensions/odoo_ext/sub-menu_list.html | 9 - doc/cla/corporate/VanRoey.md | 2 +- doc/cla/corporate/bas-solutions.md | 16 - doc/cla/corporate/vauxoo.md | 2 + doc/cla/individual/remi-filament.md | 2 +- doc/conf.py | 20 +- doc/howtos/backend.rst | 188 +++++------ doc/howtos/themes.rst | 102 +++--- doc/howtos/web.rst | 302 +++++++++--------- doc/howtos/website.rst | 88 ++--- doc/python3.rst | 44 +-- doc/reference/actions.rst | 22 +- doc/reference/cmdline.rst | 58 ++-- doc/reference/data.rst | 22 +- doc/reference/guidelines.rst | 60 ++-- doc/reference/http.rst | 22 +- doc/reference/javascript.rst | 170 +++++----- doc/reference/mixins.rst | 68 ++-- doc/reference/mobile.rst | 20 +- doc/reference/module.rst | 53 ++- doc/reference/orm.rst | 256 +++++++-------- doc/reference/qweb.rst | 14 +- doc/reference/reports.rst | 6 +- doc/reference/security.rst | 8 +- doc/reference/test-report.txt | 18 +- doc/reference/testing.rst | 26 +- doc/reference/translations.rst | 16 +- doc/reference/views.rst | 52 +-- doc/setup/cdn.rst | 16 +- doc/setup/deploy.rst | 180 +++++------ doc/setup/enterprise.rst | 28 +- doc/setup/install.rst | 176 +++++----- doc/webservices.rst | 2 +- doc/webservices/{odoo.rst => flectra.rst} | 104 +++--- doc/webservices/iap.rst | 118 +++---- doc/webservices/localization.rst | 21 +- doc/webservices/upgrade.rst | 74 ++--- 158 files changed, 1373 insertions(+), 1345 deletions(-) rename doc/_extensions/{odoo_ext => flectra_ext}/__init__.py (92%) rename doc/_extensions/{odoo_ext => flectra_ext}/breadcrumb_list.html (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/layout.html (60%) rename doc/_extensions/{odoo_ext => flectra_ext}/pygments_override.py (97%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/aside.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/alerts.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/badges.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/bootstrap.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/breadcrumbs.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/button-groups.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/buttons.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/carousel.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/close.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/code.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/component-animations.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/dropdowns.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/forms.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/glyphicons.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/grid.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/input-groups.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/jumbotron.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/labels.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/list-group.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/media.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/alerts.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/background-variant.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/border-radius.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/buttons.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/center-block.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/clearfix.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/forms.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/gradients.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/grid-framework.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/grid.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/hide-text.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/image.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/labels.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/list-group.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/nav-divider.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/nav-vertical-align.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/opacity.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/pagination.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/panels.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/progress-bar.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/reset-filter.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/reset-text.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/resize.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/responsive-visibility.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/size.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/tab-focus.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/table-row.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/text-emphasis.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/text-overflow.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/mixins/vendor-prefixes.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/modals.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/navbar.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/navs.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/normalize.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/pager.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/pagination.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/panels.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/popovers.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/print.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/progress-bars.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/responsive-embed.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/responsive-utilities.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/scaffolding.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/tables.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/theme.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/thumbnails.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/tooltip.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/type.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/utilities.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/variables.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap-3.3.6/less/wells.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap.css.map (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/bootstrap.js (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/components.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/doc.js (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/fonts/Material-Design-Icons.eot (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/fonts/Material-Design-Icons.svg (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/fonts/Material-Design-Icons.ttf (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/fonts/Material-Design-Icons.woff (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/footer.less (96%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/header.less (98%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/2x_apps_families_s.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/apps_families_s.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/banner_bg.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/geometric_gradient.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/github-square_32.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/logos/odoo_logo.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/logos/odoo_logo.svg (94%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/logos/odoo_logo_small.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/odoo_logo_rgb.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/img/odoo_logo_white.png (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/index.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/jquery.min.js (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/jquery.noconflict.js (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/layout.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/mdi.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/mixins.less (99%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/print.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/style.css (99%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/style.less (98%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/typography.less (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/static/variables.less (92%) create mode 100644 doc/_extensions/flectra_ext/sub-menu_list.html rename doc/_extensions/{odoo_ext => flectra_ext}/switcher.py (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/switchers_list.html (100%) rename doc/_extensions/{odoo_ext => flectra_ext}/theme.conf (65%) rename doc/_extensions/{odoo_ext => flectra_ext}/translator.py (99%) delete mode 100644 doc/_extensions/odoo_ext/sub-menu_list.html delete mode 100644 doc/cla/corporate/bas-solutions.md rename doc/webservices/{odoo.rst => flectra.rst} (92%) diff --git a/doc/Makefile b/doc/Makefile index 9795b902..40920bbb 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -42,13 +42,13 @@ help: clean: -rm -rf $(BUILDDIR)/* -STATICS = _extensions/odoo_ext/static +STATICS = _extensions/flectra_ext/static # TODO: add bootstrap files LESSFILES = $(wildcard $(STATICS)/*.less) $(STATICS)/style.css: $(LESSFILES) $(LESSC) $(STATICS)/style.less $(STATICS)/style.css -html: _extensions/odoo_ext/static/style.css +html: _extensions/flectra_ext/static/style.css $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." diff --git a/doc/_extensions/autojsdoc/README.rst b/doc/_extensions/autojsdoc/README.rst index ef768177..c530f1d3 100644 --- a/doc/_extensions/autojsdoc/README.rst +++ b/doc/_extensions/autojsdoc/README.rst @@ -1,7 +1,7 @@ :orphan: ====================================== -JSDoc parser/Sphinx extension for Odoo +JSDoc parser/Sphinx extension for Flectra ====================================== Why? @@ -28,7 +28,7 @@ What? If it were possible to generate JSDoc annotations from our relatively well-defined code structures, it was obviously possible to extract documentary -information directly from it, hence this Odoo-specific package/extension +information directly from it, hence this Flectra-specific package/extension trying to do exactly that. This package should eventually provide: diff --git a/doc/_extensions/autojsdoc/parser/parser.py b/doc/_extensions/autojsdoc/parser/parser.py index d979170b..6a4d9ab5 100644 --- a/doc/_extensions/autojsdoc/parser/parser.py +++ b/doc/_extensions/autojsdoc/parser/parser.py @@ -13,9 +13,9 @@ DECLARATOR_INIT_TO_REF = ('Literal', 'Identifier', 'MemberExpression') class ModuleMatcher(Visitor): """Looks for structures of the form:: - odoo.define($string, function ($name) { + flectra.define($string, function ($name) { - These are *Odoo module definitions*, upon encountering one the + These are *Flectra module definitions*, upon encountering one the matcher: * creates a module entry, optionally associated with the module comment @@ -32,7 +32,7 @@ class ModuleMatcher(Visitor): # we're interested in expression statements (toplevel call) if utils.match(node, {'expression': { 'callee': { - 'object': {'name': 'odoo'}, + 'object': {'name': 'flectra'}, 'property': {'name': 'define'}, }, }}): @@ -191,9 +191,9 @@ BASE_SCOPE = BaseScope(None, { })), ] }), - 'odoo': jsdoc.UnknownNS({ - 'name': u'odoo', - 'doc': u"Odoo", + 'flectra': jsdoc.UnknownNS({ + 'name': u'flectra', + 'doc': u"Flectra", '_members': [ ('name', jsdoc.PropertyDoc({'name': u'csrf_token', 'type': u'{String}'})), ] diff --git a/doc/_extensions/autojsdoc/parser/tests/README.rst b/doc/_extensions/autojsdoc/parser/tests/README.rst index dd862bea..37ebbc91 100644 --- a/doc/_extensions/autojsdoc/parser/tests/README.rst +++ b/doc/_extensions/autojsdoc/parser/tests/README.rst @@ -1,6 +1,6 @@ :orphan: These files should be run via pytest_, simply install pytest and from the top -of the Odoo project run ``pytest doc/_extensions``. +of the Flectra project run ``pytest doc/_extensions``. .. _pytest: https://pytest.org/ diff --git a/doc/_extensions/autojsdoc/parser/tests/test_class.py b/doc/_extensions/autojsdoc/parser/tests/test_class.py index 403ae9b4..4f175e7c 100644 --- a/doc/_extensions/autojsdoc/parser/tests/test_class.py +++ b/doc/_extensions/autojsdoc/parser/tests/test_class.py @@ -6,7 +6,7 @@ from support import params, parse def test_classvar(): [mod] = parse(""" - odoo.define('a.A', function(require) { + flectra.define('a.A', function(require) { var Class = require('Class'); /** * This is my class-kai @@ -28,7 +28,7 @@ def test_classvar(): def test_classret(): [mod] = parse(""" - odoo.define('a.A', function(require) { + flectra.define('a.A', function(require) { var Class = require('Class'); /** * This is my class-kai @@ -46,7 +46,7 @@ def test_classret(): def test_methods(): [mod] = parse(""" - odoo.define('a.A', function(require) { + flectra.define('a.A', function(require) { var Class = require('Class'); return Class.extend({ /** @@ -92,7 +92,7 @@ def test_methods(): def test_mixin_explicit(): [mod] = parse(""" - odoo.define('a.A', function (require) { + flectra.define('a.A', function (require) { var Class = require('Class'); var mixins = require('mixins'); /** @@ -108,7 +108,7 @@ def test_mixin_explicit(): def test_mixin_implicit(): [mod] = parse(""" - odoo.define('a.A', function(require) { + flectra.define('a.A', function(require) { var Class = require('Class'); var Mixin = require('Mixin'); /** @@ -127,7 +127,7 @@ def test_mixin_implicit(): def test_instanciation(): [A, a] = parse(""" - odoo.define('A', function (r) { + flectra.define('A', function (r) { var Class = r('Class'); /** * @class A @@ -136,7 +136,7 @@ def test_instanciation(): foo: function () {} }); }); - odoo.define('a', function (r) { + flectra.define('a', function (r) { var A = r('A'); var a = new A; return a; @@ -147,7 +147,7 @@ def test_instanciation(): def test_non_function_properties(): [A] = parse(""" - odoo.define('A', function (r) { + flectra.define('A', function (r) { var Class = r('Class'); return Class.extend({ template: 'thing', @@ -163,7 +163,7 @@ def test_non_function_properties(): def test_non_extend_classes(): [mod] = parse(""" - odoo.define('A', function () { + flectra.define('A', function () { /** * @class */ @@ -175,11 +175,11 @@ def test_non_extend_classes(): def test_extend(): [a, _] = parse(""" - odoo.define('A', function (require) { + flectra.define('A', function (require) { var Class = require('Class'); return Class.extend({}); }); - odoo.define('B', function (require) { + flectra.define('B', function (require) { var A = require('A'); A.include({ /** A property */ @@ -203,7 +203,7 @@ def test_extend(): @pytest.mark.skip(reason="Need to implement member/var-parsing?") def test_members(): [mod] = parse(""" - odoo.define('A', function (r) { + flectra.define('A', function (r) { var Class = r('Class'); return Class.extend({ init: function () { diff --git a/doc/_extensions/autojsdoc/parser/tests/test_crap.py b/doc/_extensions/autojsdoc/parser/tests/test_crap.py index 70063e6d..c357fea8 100644 --- a/doc/_extensions/autojsdoc/parser/tests/test_crap.py +++ b/doc/_extensions/autojsdoc/parser/tests/test_crap.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -Test various crap patterns found in Odoo code to ensure they don't blow up +Test various crap patterns found in Flectra code to ensure they don't blow up the parser thingie """ from autojsdoc.parser import jsdoc @@ -8,7 +8,7 @@ from support import parse def test_export_external(): [mod] = parse(""" - odoo.define('module', function () { + flectra.define('module', function () { return $.Deferred().reject(); }); """) @@ -17,7 +17,7 @@ def test_export_external(): def test_extend_jq(): parse(""" - odoo.define('a', function (r) { + flectra.define('a', function (r) { $.extend($.expr[':'], { a: function () {} }); $.fn.extend({ a: function () {} }); }); @@ -25,14 +25,14 @@ def test_extend_jq(): def test_extend_dynamic(): parse(""" - odoo.define('a', function () { + flectra.define('a', function () { foo.bar.baz[qux + '_external'] = function () {}; }); """) def test_extend_deep(): parse(""" - odoo.define('a', function () { + flectra.define('a', function () { var eventHandler = $.summernote.eventHandler; var dom = $.summernote.core.dom; dom.thing = function () {}; @@ -44,7 +44,7 @@ def test_extend_deep(): def test_arbitrary(): parse(""" - odoo.define('bob', function () { + flectra.define('bob', function () { var page = window.location.href.replace(/^.*\/\/[^\/]+/, ''); var mailWidgets = ['mail_followers', 'mail_thread', 'mail_activity', 'kanban_activity']; var bob; @@ -54,7 +54,7 @@ def test_arbitrary(): def test_prototype(): [A, B] = parse(""" - odoo.define('mod1', function () { + flectra.define('mod1', function () { var exports = {}; exports.Foo = Backbone.Model.extend({}); exports.Bar = Backbone.Model.extend({}); @@ -64,7 +64,7 @@ def test_prototype(): exports.Baz = Backbone.Model.extend({}); return exports; }); - odoo.define('mod2', function (require) { + flectra.define('mod2', function (require) { var models = require('mod1'); var _super_orderline = models.Bar.prototype; models.Foo = models.Bar.extend({}); diff --git a/doc/_extensions/autojsdoc/parser/tests/test_module.py b/doc/_extensions/autojsdoc/parser/tests/test_module.py index 2a63cc17..ea1425d3 100644 --- a/doc/_extensions/autojsdoc/parser/tests/test_module.py +++ b/doc/_extensions/autojsdoc/parser/tests/test_module.py @@ -9,7 +9,7 @@ def test_single(): /** * This is a super module! */ - odoo.define('supermodule', function (req) { + flectra.define('supermodule', function (req) { var other = req('other'); }); """) @@ -22,13 +22,13 @@ def test_single(): def test_multiple(): [mod1, mod2, mod3] = parse(""" - odoo.define('module1', function (req) { + flectra.define('module1', function (req) { return 1; }); - odoo.define('module2', function (req) { + flectra.define('module2', function (req) { return req('dep2'); }); - odoo.define('module3', function (req) { + flectra.define('module3', function (req) { var r = req('dep3'); return r; }); @@ -54,7 +54,7 @@ def test_multiple(): def test_func(): [mod] = parse(""" - odoo.define('module', function (d) { + flectra.define('module', function (d) { /** * @param {Foo} bar this is a bar * @param {Baz} qux this is a qux @@ -78,7 +78,7 @@ def test_func(): def test_hoist(): [mod] = parse(""" - odoo.define('module', function() { + flectra.define('module', function() { return foo; /** * @param a_thing @@ -95,7 +95,7 @@ def test_hoist(): def test_export_instance(): [mod] = parse(""" - odoo.define('module', function (require) { + flectra.define('module', function (require) { var Class = require('Class'); /** * Provides an instance of Class @@ -109,13 +109,13 @@ def test_export_instance(): def test_bounce(): [m2, m1] = parse(""" - odoo.define('m2', function (require) { + flectra.define('m2', function (require) { var Item = require('m1'); return { Item: Item }; }); - odoo.define('m1', function (require) { + flectra.define('m1', function (require) { var Class = require('Class'); var Item = Class.extend({}); return Item; @@ -129,7 +129,7 @@ def test_bounce(): def test_reassign(): [m] = parse(""" - odoo.define('m', function (require) { + flectra.define('m', function (require) { var Class = require('Class'); /** local class */ var Class = Class.extend({}); @@ -142,12 +142,12 @@ def test_reassign(): def test_attr(): [m1, m2] = parse(""" - odoo.define('m1', function (require) { + flectra.define('m1', function (require) { var Class = require('Class'); var Item = Class.extend({}); return {Item: Item}; }); - odoo.define('m2', function (require) { + flectra.define('m2', function (require) { var Item = require('m1').Item; Item.include({}); return Item.extend({}); @@ -159,14 +159,14 @@ def test_attr(): def test_nothing_implicit(): [m] = parse(""" - odoo.define('m', function () { + flectra.define('m', function () { }); """) assert m.exports is None def test_nothing_explicit(): [m] = parse(""" - odoo.define('m', function () { + flectra.define('m', function () { return; }); """) diff --git a/doc/_extensions/autojsdoc/parser/tests/test_namespace.py b/doc/_extensions/autojsdoc/parser/tests/test_namespace.py index 54cbcf8c..2e218ebc 100644 --- a/doc/_extensions/autojsdoc/parser/tests/test_namespace.py +++ b/doc/_extensions/autojsdoc/parser/tests/test_namespace.py @@ -5,7 +5,7 @@ from support import parse, params def test_empty(): [mod] = parse(""" - odoo.define('a.ns', function (r) { + flectra.define('a.ns', function (r) { return {}; }); """) @@ -14,7 +14,7 @@ def test_empty(): def test_inline(): [mod] = parse(""" - odoo.define('a.ns', function (r) { + flectra.define('a.ns', function (r) { return { /** * a thing @@ -31,7 +31,7 @@ def test_inline(): def test_header(): [mod] = parse(""" - odoo.define('a.ns', function (r) { + flectra.define('a.ns', function (r) { /** * @property {Boolean} a a thing */ @@ -45,7 +45,7 @@ def test_header(): def test_header_conflict(): """ should the header or the inline comment take precedence? """ [mod] = parse(""" - odoo.define('a.ns', function (r) { + flectra.define('a.ns', function (r) { /** * @property {Boolean} a a thing */ @@ -61,7 +61,7 @@ def test_header_conflict(): def test_mixin(): [mod] = parse(""" - odoo.define('a.mixin', function (r) { + flectra.define('a.mixin', function (r) { /** * @mixin */ @@ -81,7 +81,7 @@ def test_mixin(): def test_literal(): [mod] = parse(""" - odoo.define('a.ns', function (r) { + flectra.define('a.ns', function (r) { /** whop whop */ return { 'a': 1, @@ -97,7 +97,7 @@ def test_literal(): def test_fill_ns(): [mod] = parse(""" - odoo.define('a.ns', function (r) { + flectra.define('a.ns', function (r) { var Class = r('Class'); var ns = {}; /** ok */ @@ -120,14 +120,14 @@ def test_fill_ns(): def test_extend_other(): [o, b] = parse(""" - odoo.define('a.ns', function () { + flectra.define('a.ns', function () { /** @name outer */ return { /** @name inner */ a: {} }; }); - odoo.define('b', function (r) { + flectra.define('b', function (r) { var o = r('a.ns'); var Class = r('Class'); /** Class 1 */ @@ -151,7 +151,7 @@ def test_extend_other(): def test_ns_variables(): [mod] = parse(""" - odoo.define('A', function (r) { + flectra.define('A', function (r) { var Class = r('Class'); var Thing = Class.extend({}); return { @@ -166,7 +166,7 @@ def test_diff(): """ Have the NS key and the underlying object differ """ [mod] = parse(""" - odoo.define('mod', function (r) { + flectra.define('mod', function (r) { var Class = r('Class'); var Foo = Class.extend({}); return { Class: Foo }; diff --git a/doc/_extensions/odoo_ext/__init__.py b/doc/_extensions/flectra_ext/__init__.py similarity index 92% rename from doc/_extensions/odoo_ext/__init__.py rename to doc/_extensions/flectra_ext/__init__.py index 3cca5f7c..a8c1e94d 100644 --- a/doc/_extensions/odoo_ext/__init__.py +++ b/doc/_extensions/flectra_ext/__init__.py @@ -18,18 +18,18 @@ def setup(app): else: if getattr(app.config, 'html_translator_class', None): app.warn("Overriding the explicitly set html_translator_class setting", - location="odoo extension") - app.config.html_translator_class = 'odoo_ext.translator.BootstrapTranslator' + location="flectra extension") + app.config.html_translator_class = 'flectra_ext.translator.BootstrapTranslator' switcher.setup(app) - app.add_config_value('odoo_cover_default', None, 'env') - app.add_config_value('odoo_cover_external', {}, 'env') - app.add_config_value('odoo_cover_default_external', lambda conf: conf.odoo_cover_default, 'env') + app.add_config_value('flectra_cover_default', None, 'env') + app.add_config_value('flectra_cover_external', {}, 'env') + app.add_config_value('flectra_cover_default_external', lambda conf: conf.flectra_cover_default, 'env') app.connect('html-page-context', update_meta) def update_meta(app, pagename, templatename, context, doctree): meta = context.setdefault('meta', {}) - meta.setdefault('banner', app.config.odoo_cover_default) + meta.setdefault('banner', app.config.flectra_cover_default) def navbarify(node, navbar=None): """ diff --git a/doc/_extensions/odoo_ext/breadcrumb_list.html b/doc/_extensions/flectra_ext/breadcrumb_list.html similarity index 100% rename from doc/_extensions/odoo_ext/breadcrumb_list.html rename to doc/_extensions/flectra_ext/breadcrumb_list.html diff --git a/doc/_extensions/odoo_ext/layout.html b/doc/_extensions/flectra_ext/layout.html similarity index 60% rename from doc/_extensions/odoo_ext/layout.html rename to doc/_extensions/flectra_ext/layout.html index cb1015d2..586b6f88 100644 --- a/doc/_extensions/odoo_ext/layout.html +++ b/doc/_extensions/flectra_ext/layout.html @@ -54,7 +54,7 @@ - Third party apps + Third party apps -
  • Tour
  • -
  • Pricing
  • -
  • Docs
  • +
  • Tour
  • +
  • Pricing
  • +
  • Docs