eneldoserrata / marcos_addons Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://marcos.do/
Home Page: https://marcos.do/
@gustavovalverde @yasmanycastillo Buenas tardes mis queridos amigo, muy agradecido por su buenos deseos de querer colaborarme con el desarrollo de ncf pero olvide proteger el branch dev-10.0 y los push que hicieron me resultaron muy dolorosos cuando llegue a un lugar actualizar.
Tenemos que hacer una reunión los tres para definir como vamos hacer esto porque como esta no vamos a ser eficientes, propongo una reunión la próxima semana el jueves para que nos pongamos de acuerdo y pautemos las reglas para las demás personas que quieran colaborar también.
Saludos
ES
Cuando se activa el POS del restaurante se presentan múltiples inconvenientes si el módulo ncf_pos está activo:
Al momento de generar un reporte 607 aparece el mensaje sigiuiente:
Odoo Server Error Traceback (most recent call last): File "/var/lib/odoo/odoo/openerp/http.py", line 643, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/var/lib/odoo/odoo/openerp/http.py", line 680, in dispatch result = self._call_function(**self.params) File "/var/lib/odoo/odoo/openerp/http.py", line 316, in _call_function return checked_call(self.db, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/http.py", line 309, in checked_call result = self.endpoint(*a, **kw) File "/var/lib/odoo/odoo/openerp/http.py", line 959, in __call__ return self.method(*args, **kw) File "/var/lib/odoo/odoo/openerp/http.py", line 509, in response_wrap response = f(*args, **kw) File "/var/lib/odoo/odoo/addons/web/controllers/main.py", line 896, in call_kw return self._call_kw(model, method, args, kwargs) File "/var/lib/odoo/odoo/addons/web/controllers/main.py", line 888, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/api.py", line 354, in old_api result = method(recs, *args, **kwargs) File "/var/lib/odoo/marcos_addons/ncf_manager/models/dgii_sale.py", line 68, in create self.create_report() File "/var/lib/odoo/odoo/openerp/api.py", line 248, in wrapper return new_api(self, *args, **kwargs) File "/var/lib/odoo/marcos_addons/ncf_manager/models/dgii_sale.py", line 201, in create_report self.create_report_lines(invoices) File "/var/lib/odoo/marcos_addons/ncf_manager/models/dgii_sale.py", line 93, in create_report_lines TIPO_IDENTIFICACION = "1" if len(RNC_CEDULA.strip()) == 9 else "2" AttributeError: 'bool' object has no attribute 'strip'
Entiendo más factible (a largo plazo) mejor adaptar el módulo de OCA: https://github.com/OCA/bank-statement-import/tree/10.0/account_bank_statement_import_ofx con los "periquitos" de los bancos locales, ya que normalmente su repo recibe más soporte, así no nos ponemos la tarea completa en nuestros hombros.
Solo sería tener esa dependencia externa y hacer los cambios ahí.
Cuando se van a configurar los comprobantes, sería mucho más práctico si en la vista inicial tuviésemos el nombre de dónde/para qué se está utilizando X comprobante.
Por ejemplo:
Oficina Santo Domingo - Caja 1
Oficina Santiago - Caja 1
Oficina Santiago - Caja 2
Así como también en la vista poder visualizar de qué compañía es la secuencia, para un ambiente multicompañía, ya que si no el prefijo se va a repetir por N compañías, siendo muy difícil identificar de cuál es si no entramos.
Bug aun no identificado, al activar el modulo de ipf_manager para funcionamiento con impresoras fiscales, solia duplicar comprobante fiscal y no generar la segunda factura aunque si la imprimia, eneldo para ver si el problem estaba en que estaba duplicando la numero agrego un metodo a ncf_pos que incrementara la secuencia, esto mantuvo el error ahora siempre las facturas tienen ncf distinto.
Aunque entiendo perfectamente que ahora mismo la implementación de este proceso de actualización de datos contra la DGII se está realizando solo con el campo VAT
, también es bueno considerar un tema de usabilidad y costumbre; si tenemos un cliente que está en v9 al pasarlo a v10 luego de meses (o años) utilizando una forma de creación de usuarios, que ahora sea diferente crea resistencia y hasta errores por vieja costumbre.
Independientemente que el campo VAT se utilice para validar Contactos existentes, el campo NAME debe crear el usuario si se pone el RNC o Cédula, e incluso hacer la misma validación al momento de pasarlo al campo VAT, de si ya existe otro partner con los mismos datos.
Issue de prueba
En el archivo de pos_order.py hay una lógica de decisión para que se seleccione un cliente por defecto:
if not pos_order.partner_id: pos_order.partner_id = pos_order.session_id.config_id.default_partner_id.id
Sin embargo esta decisión no está afectando el comportamiento del POS.
.
Aunque los NCF de informales son de la empresa y no del proveedor, en algunos casos es práctico que se de una advertencia y no deje validarlos si ya se acabaron (para que no afecte el reporte de la DGII).
Sin embargo, cuando se activa la opción de validación de la DGII, el move_name se convierte en False:
`
En la consola se presenta el siguient error:
Server application error {"message":"Odoo Server Error","code":200,"data":{"debug":"Traceback (most recent call last):\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 638, in _handle_exception\n return super(JsonRequest, self)._handle_exception(exception)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 675, in dispatch\n result = self._call_function(**self.params)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 331, in _call_function\n return checked_call(self.db, *args, **kwargs)\n File \"/odoo/odoo-server/src/odoo/odoo/service/model.py\", line 119, in wrapper\n return f(dbname, *args, **kwargs)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 324, in checked_call\n result = self.endpoint(*a, **kw)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 933, in __call__\n return self.method(*args, **kw)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 504, in response_wrap\n response = f(*args, **kw)\n File \"/odoo/odoo-server/src/odoo/addons/web/controllers/main.py\", line 878, in call_kw\n return self._call_kw(model, method, args, kwargs)\n File \"/odoo/odoo-server/src/odoo/addons/web/controllers/main.py\", line 870, in _call_kw\n return call_kw(request.env[model], method, args, kwargs)\n File \"/odoo/odoo-server/src/odoo/odoo/api.py\", line 679, in call_kw\n return call_kw_model(method, model, args, kwargs)\n File \"/odoo/odoo-server/src/odoo/odoo/api.py\", line 664, in call_kw_model\n result = method(recs, *args, **kwargs)\n File \"/odoo/odoo-server/src/odoo/addons/purchase/models/account_invoice.py\", line 194, in create\n invoice = super(AccountInvoice, self).create(vals)\n File \"/odoo/odoo-server/src/odoo/addons/account/models/account_invoice.py\", line 345, in create\n invoice = super(AccountInvoice, self.with_context(mail_create_nolog=True)).create(vals)\n File \"/odoo/odoo-server/src/odoo/addons/mail/models/mail_thread.py\", line 228, in create\n thread = super(MailThread, self).create(values)\n File \"/odoo/odoo-server/src/odoo/odoo/models.py\", line 3816, in create\n record = self.browse(self._create(old_vals))\n File \"/odoo/odoo-server/src/odoo/odoo/models.py\", line 3974, in _create\n self._validate_fields(vals)\n File \"/odoo/odoo-server/src/odoo/odoo/models.py\", line 1070, in _validate_fields\n check(self)\n File \"<decorator-gen-268>\", line 2, in constrains_move_name\n File \"/odoo/odoo-server/src/odoo/odoo/api.py\", line 361, in loop\n result = [method(rec, *args, **kwargs) for rec in self]\n File \"/odoo/odoo-server/src/custom/dominican_addons/ncf_manager/models/account_invoice.py\", line 169, in constrains_move_name\n raise exceptions.ValidationError(res[2])\nValidationError: (u'El n\\xfamero de comprobante False no es v\\xe1lido, verifique si no est\\xe1 digitando un comprobante de Consumidor Final (C\\xf3digo 02) o revise si no lo ha digitado de forma correcta', None)\n","exception_type":"validation_error","message":"El número de comprobante False no es válido, verifique si no está digitando un comprobante de Consumidor Final (Código 02) o revise si no lo ha digitado de forma correcta\nNone","name":"odoo.exceptions.ValidationError","arguments":["El número de comprobante False no es válido, verifique si no está digitando un comprobante de Consumidor Final (Código 02) o revise si no lo ha digitado de forma correcta",null]}}
Steps to reproduce:
Create an invoice using a journal_id
in another currency different to DOP (the principal), or changing the currency_id
to USD or EUR.
Current behavior:
When changing currency to a different one from the principal, this error arises:
Traceback (most recent call last):
File "/odoo/odoo-server/src/odoo/openerp/http.py", line 648, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/odoo-server/src/odoo/openerp/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/odoo/odoo-server/src/odoo/openerp/http.py", line 321, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/odoo-server/src/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/odoo-server/src/odoo/openerp/http.py", line 314, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/odoo-server/src/odoo/openerp/http.py", line 964, in __call__
return self.method(*args, **kw)
File "/odoo/odoo-server/src/odoo/openerp/http.py", line 514, in response_wrap
response = f(*args, **kw)
File "/odoo/odoo-server/src/odoo/addons/web/controllers/main.py", line 888, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/src/odoo/addons/web/controllers/main.py", line 880, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/odoo/odoo-server/src/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/odoo/odoo-server/src/odoo/openerp/api.py", line 381, in old_api
result = method(recs, *args, **kwargs)
File "/odoo/odoo-server/src/odoo/openerp/models.py", line 6071, in onchange
record._onchange_eval(name, field_onchange[name], result)
File "/odoo/odoo-server/src/odoo/openerp/models.py", line 5928, in _onchange_eval
method_res = method(self)
File "/odoo/odoo-server/src/custom/marcos_addons/ncf_manager/models/account_invoice.py", line 135, in onchange_date_invoice
self._get_rate()
File "/odoo/odoo-server/src/odoo/openerp/api.py", line 248, in wrapper
return new_api(self, *args, **kwargs)
File "/odoo/odoo-server/src/odoo/openerp/api.py", line 425, in new_api
result = [method(rec, *args, **kwargs) for rec in self]
File "/odoo/odoo-server/src/custom/marcos_addons/ncf_manager/models/account_invoice.py", line 127, in _get_rate
self.rate = 1 / self._cr.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
Expected behavior:
Change the currency and behave as normal using the currency exchange Journal when applies.
Video/Screenshot link (optional):
This part of the code is causing the error:
Al instalar el módulo de restaurantes se presenta el siguiente error:
Error: QWeb2 - template['PaymentScreenWidget']: Runtime Error: TypeError: Cannot read property 'is_return_order' of null
Al momento de crear un Contacto utilizando el método de la DGII, si luego borro el mismo e intento crearlo nuevamente, me dice que ya existe.
Cuando se reemplaza una version antigua el modulo ncf_manager por la nueva version del mismo se presenta un problema con algunos views los cuales dicen que hay campos no existentes lo solucione eliminando de la BD los views a los que hacian referencia estos errores para que se recrearan al momento de iniciar la instancia.
Y la pregunta seria:
Existe alguna forma mas comoda y/o eficiente de resolver este problema
Al momento de intentar validar un gasto menor arroja el siguiente error:
Y en la consola se ve el siguiente:
Server application error {"message":"Odoo Server Error","code":200,"data":{"debug":"Traceback (most recent call last):\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 638, in _handle_exception\n return super(JsonRequest, self)._handle_exception(exception)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 675, in dispatch\n result = self._call_function(**self.params)\n File \"/odoo/odoo-server/src/odoo/odoo/http.py\", line 331, in _call_function\n return checked_call(self.db, *args, **kwargs)\n File \"/odoo/odoo-server/src/odoo/odoo/service/model.py\", line 161, in wrapper\n raise ValidationError(msg)\nValidationError: ('The operation cannot be completed, probably due to the following:\\n- deletion: you may be trying to delete a record while other records still reference it\\n- creation/update: a mandatory field is not correctly set\\n\\n[object with reference: partner_id - partner.id]', None)\n","exception_type":"validation_error","message":"The operation cannot be completed, probably due to the following:\n- deletion: you may be trying to delete a record while other records still reference it\n- creation/update: a mandatory field is not correctly set\n\n[object with reference: partner_id - partner.id]\nNone","name":"odoo.exceptions.ValidationError","arguments":["The operation cannot be completed, probably due to the following:\n- deletion: you may be trying to delete a record while other records still reference it\n- creation/update: a mandatory field is not correctly set\n\n[object with reference: partner_id - partner.id]",null]}}
Steps to reproduce:
Create a supplier invoice.
Current behavior:
There's no option to select or change the supplier_fiscal_type
to be used for the 606 Report.
Expected behavior:
If an invoice is created, a type of expense must be chosen, which varies depending on the expense being paid. This expense is not supposed to be tied to a Fiscal Position but to the Supplier Invoice. The supplier_fiscal_type
must be changed to expense_type
and moved from Fiscal Positions to Supplier Invoice.
As DGII expect to have this expenses matched with the Accounting, after this change there should be a way to tied each type of expense to a defined expense account. <--- This is not a first step, but it should reduce the overhead on the accountant and also makes a cleaner 606 Report which match to the DGII's IB1 report
Video/Screenshot link (optional):
Here is an example, as you can buy and have any type of expenses with an International Provider, but is limited to one option.
En la factura, a un proveedor informal se le puede asignar cualquier tipo de gasto, pero no por esto se le debe poner información fiscal, dígase RNC.
Esta decisión obliga que se ponga Información Fiscal, cuando realmente el tipo de gasto no es decisor en la información fiscal.
https://github.com/eneldoserrata/marcos_addons/blob/dev-10.0/ncf_manager/models/res.py#L59
El factor que decide si un proveedor necesita información fiscal es si el tipo de compra está entre ['normal', 'minor', 'informal'].
Hi 👊
This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.
Once you have closed this issue, I'll create separate pull requests for every update as soon as I find one.
That's it for now!
Happy merging! 🤖
en algun lugar entre el commit ec29356 del primero de Julio y el commit e06b19a del 18 de Julio se rompio el POS, voy a seguri haciendo pruebas en el entrono de pruebas para ver donde se habra roto, pero las caja no cierran. Voy a seguir corriendo pruebas a ver si puedo aislar el problema.
Odoo Server Error Traceback (most recent call last): File "/var/lib/odoo/odoo/openerp/http.py", line 646, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/var/lib/odoo/odoo/openerp/http.py", line 683, in dispatch result = self._call_function(**self.params) File "/var/lib/odoo/odoo/openerp/http.py", line 319, in _call_function return checked_call(self.db, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/http.py", line 312, in checked_call result = self.endpoint(*a, **kw) File "/var/lib/odoo/odoo/openerp/http.py", line 962, in __call__ return self.method(*args, **kw) File "/var/lib/odoo/odoo/openerp/http.py", line 512, in response_wrap response = f(*args, **kw) File "/var/lib/odoo/odoo/addons/web/controllers/main.py", line 897, in call_kw return self._call_kw(model, method, args, kwargs) File "/var/lib/odoo/odoo/addons/web/controllers/main.py", line 889, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/models.py", line 1557, in fields_view_get xarch, xfields = View.postprocess_and_fields(cr, uid, self._name, etree.fromstring(result['arch']), view_id, context=ctx) File "/var/lib/odoo/odoo/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/addons/base/ir/ir_ui_view.py", line 920, in postprocess_and_fields self.raise_view_error(cr, user, message, view_id, context) File "/var/lib/odoo/odoo/openerp/api.py", line 250, in wrapper return old_api(self, *args, **kwargs) File "/var/lib/odoo/odoo/openerp/addons/base/ir/ir_ui_view.py", line 463, in raise_view_error raise AttributeError(message) AttributeError: El campo
message_follower_ids` no existe
Error de contexto:
Vista pos.session.form.view
[view_id: 728, xml_id: point_of_sale.view_pos_session_form, model: pos.session, parent_id: n/a]`
web.assets_common.js:2544 Server application error {"message":"Odoo Server Error","code":200,"data":{"debug":"Traceback (most recent call last):\n File \"/var/lib/odoo/odoo/openerp/http.py\", line 646, in _handle_exception\n return super(JsonRequest, self)._handle_exception(exception)\n File \"/var/lib/odoo/odoo/openerp/http.py\", line 683, in dispatch\n result = self._call_function(**self.params)\n File \"/var/lib/odoo/odoo/openerp/http.py\", line 319, in _call_function\n return checked_call(self.db, *args, **kwargs)\n File \"/var/lib/odoo/odoo/openerp/service/model.py\", line 118, in wrapper\n return f(dbname, *args, **kwargs)\n File \"/var/lib/odoo/odoo/openerp/http.py\", line 312, in checked_call\n result = self.endpoint(*a, **kw)\n File \"/var/lib/odoo/odoo/openerp/http.py\", line 962, in __call__\n return self.method(*args, **kw)\n File \"/var/lib/odoo/odoo/openerp/http.py\", line 512, in response_wrap\n response = f(*args, **kw)\n File \"/var/lib/odoo/odoo/addons/web/controllers/main.py\", line 897, in call_kw\n return self._call_kw(model, method, args, kwargs)\n File \"/var/lib/odoo/odoo/addons/web/controllers/main.py\", line 889, in _call_kw\n return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)\n File \"/var/lib/odoo/odoo/openerp/api.py\", line 250, in wrapper\n return old_api(self, *args, **kwargs)\n File \"/var/lib/odoo/odoo/openerp/models.py\", line 1557, in fields_view_get\n xarch, xfields = View.postprocess_and_fields(cr, uid, self._name, etree.fromstring(result['arch']), view_id, context=ctx)\n File \"/var/lib/odoo/odoo/openerp/api.py\", line 250, in wrapper\n return old_api(self, *args, **kwargs)\n File \"/var/lib/odoo/odoo/openerp/addons/base/ir/ir_ui_view.py\", line 920, in postprocess_and_fields\n self.raise_view_error(cr, user, message, view_id, context)\n File \"/var/lib/odoo/odoo/openerp/api.py\", line 250, in wrapper\n return old_api(self, *args, **kwargs)\n File \"/var/lib/odoo/odoo/openerp/addons/base/ir/ir_ui_view.py\", line 463, in raise_view_error\n raise AttributeError(message)\nAttributeError: El campo
message_follower_idsno existe\n\nError de contexto:\nVista
pos.session.form.view\n[view_id: 728, xml_id: point_of_sale.view_pos_session_form, model: pos.session, parent_id: n/a]\n","exception_type":"internal_error","message":"El campo
message_follower_idsno existe\n\nError de contexto:\nVista
pos.session.form.view\n[view_id: 728, xml_id: point_of_sale.view_pos_session_form, model: pos.session, parent_id: n/a]","name":"exceptions.AttributeError","arguments":["El campo
message_follower_idsno existe\n\nError de contexto:\nVista
pos.session.form.view\n[view_id: 728, xml_id: point_of_sale.view_pos_session_form, model: pos.session, parent_id: n/a]"]}}(anonymous function) @ web.assets_common.js:2544(anonymous function) @ web.assets_common.js:650fire @ web.assets_common.js:644fireWith @ web.assets_common.js:649done @ web.assets_common.js:1040callback @ web.assets_common.js:1060
On saving the configuration for you user, configuration gets applied to all users, i've noticed module is not writing new configurations to shop_ncf_config so all users in res_users_shop_ncf_config_rel get the same shop_ncf_config_id:
You can see here;
Aunque en el código están considerados todos los exceptions que se deben arrojar en cada caso de validación, algunos no están siendo validados, e.j.: No se está validando con DGII si el NCF de un proveedor está dentro de los aprobados.
El modulo RNC Validation no aparece en el repositorio de aplicaciones de odoo. cuando borre los comentarios que tiene arriba antes de los datos .json, aparecio inmediatamente
Al crear una compania nueva esta saliendo un error el cual dice que ya existe un contacto registrado con el mismo nombre.
la validacion esta en ncf_manager/models/res.py en el metodo write
Al crear una nota de credito para descuento en vez de traer la secuencia del NCF trae la del diario.
Por lo tanto es necesario modificar este comportamiento.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.