Error al mandar correo desde la vista de la factura
Buen dia @agb80 @jose.maldonado @cuauhtemoc.diaz @jorge.medina no se si este issue vaya aqui en este repositorio pero la verdad no haye en donde meterlo
En SACSA esta saliendo este error al momento de querer mandar una factura por correo, cuando les clic al boton Enviar por correo-e
les sale este error
Traceback (most recent call last): File "/opt/pyerp_master/parts/server/openerp/http.py", line 538, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/pyerp_master/parts/server/openerp/http.py", line 575, in dispatch result = self._call_function(**self.params) File "/opt/pyerp_master/parts/server/openerp/http.py", line 311, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/http.py", line 308, in checked_call return self.endpoint(*a, **kw) File "/opt/pyerp_master/parts/server/openerp/http.py", line 804, in __call__ return self.method(*args, **kw) File "/opt/pyerp_master/parts/server/openerp/http.py", line 404, in response_wrap response = f(*args, **kw) File "/opt/pyerp_master/parts/server/addons/web/controllers/main.py", line 944, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/pyerp_master/parts/server/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/addons/email_template/wizard/mail_compose_message.py", line 53, in default_get res.get('model'), res.get('res_id'), context=context File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/addons/email_template/wizard/mail_compose_message.py", line 103, in onchange_template_id values = self.generate_email_for_composer_batch(cr, uid, template_id, [res_id], context=context)[res_id] File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/addons/email_template/wizard/mail_compose_message.py", line 167, in generate_email_for_composer_batch template_values = self.pool.get('email.template').generate_email_batch(cr, uid, template_id, res_ids, fields=fields, context=ctx) File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/l10n_mx_facturae/l10n_mx_facturae/models/email_template.py", line 27, in generate_email_batch cr, uid, template_id, res_ids, context=context, fields=fields, File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/addons/email_template/email_template.py", line 473, in generate_email_batch res_ids_to_templates = self.get_email_template_batch(cr, uid, template_id, res_ids, context) File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/addons/email_template/email_template.py", line 233, in get_email_template_batch langs = self.render_template_batch(cr, uid, template.lang, template.model, res_ids, context) File "/opt/pyerp_master/parts/server/openerp/fields.py", line 817, in __get__ self.determine_value(record) File "/opt/pyerp_master/parts/server/openerp/fields.py", line 910, in determine_value record._prefetch_field(self) File "/opt/pyerp_master/parts/server/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/models.py", line 3233, in _prefetch_field result = records.read(list(fnames), load='_classic_write') File "/opt/pyerp_master/parts/server/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/models.py", line 3178, in read self._read_from_database(stored, inherited) File "/opt/pyerp_master/parts/server/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/models.py", line 3262, in _read_from_database self._apply_ir_rules(query, 'read') File "/opt/pyerp_master/parts/server/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/api.py", line 472, in new_api result = method(self._model, cr, uid, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/models.py", line 4531, in _apply_ir_rules rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context) File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get query = self.pool[model_name]._where_calc(cr, SUPERUSER_ID, dom, active_test=False) File "/opt/pyerp_master/parts/server/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) File "/opt/pyerp_master/parts/server/openerp/models.py", line 4476, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/opt/pyerp_master/parts/server/openerp/osv/expression.py", line 662, in __init__ self.parse(cr, uid, context=context) File "/opt/pyerp_master/parts/server/openerp/osv/expression.py", line 828, in parse raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf))) ValueError: Invalid field 'company_id' in leaf "<osv.ExtendedLeaf: ('company_id', 'child_of', [1]) on email_template (ctx: )>"
Si yo trato de mandar el correo con un usuario mortal me sale el error, pero cuando yo trato de mandar el correo con el usuario administrador con ese si manda correo no marca ningun error Saludos