diff --git a/account.xml b/account.xml new file mode 100644 index 0000000..dbd7dbe --- /dev/null +++ b/account.xml @@ -0,0 +1,16 @@ + + + + + Pagos + account.move.line + account.move.line + optical_equipment/report/Payment.fodt + + + + form_print + account.move.line,-1 + + diff --git a/configuration_equipment.py b/configuration_equipment.py index 4398084..b5e281f 100644 --- a/configuration_equipment.py +++ b/configuration_equipment.py @@ -1,8 +1,10 @@ from trytond.model import ( ModelSingleton, ModelSQL, ModelView, fields) from trytond.pyson import Id +from trytond.modules.company.model import ( + CompanyMultiValueMixin, CompanyValueMixin) -class Configuration(ModelSingleton, ModelSQL, ModelView): +class Configuration(ModelSingleton, ModelSQL, ModelView, CompanyMultiValueMixin): 'Equipment Configuration' __name__='optical_equipment.configuration' @@ -28,3 +30,7 @@ class Configuration(ModelSingleton, ModelSQL, ModelView): moisture_uom = fields.Many2One('product.uom', "Moisture UOM", domain=[('category', '=', Id('optical_equipment', 'uom_cat_relative_humedity'))], depends=['moisture_min']) + sale_quote_number = fields.Many2One('ir.sequence', "Sale Quote Number", + domain=[ + ('sequence_type', '=', Id('sale','sequence_type_sale')) + ]) diff --git a/locale/es.po b/locale/es.po index ff11aa3..42dab13 100644 --- a/locale/es.po +++ b/locale/es.po @@ -698,6 +698,10 @@ msgctxt "field:optical_equipment_maintenance.service,description:" msgid "Description" msgstr "Descripción" +msgctxt "field:sale.sale,quote_number:" +msgid "Quote Number" +msgstr "Cotización #" + msgctxt "field:sale.sale,description:sale." msgid "Description" msgstr "Tiempo de Entrega" diff --git a/report/Payment.fodt b/report/Payment.fodt new file mode 100644 index 0000000..7ba8c0c Binary files /dev/null and b/report/Payment.fodt differ diff --git a/report/Sale.fodt b/report/Sale.fodt index a65f5e9..d15e7c1 100644 --- a/report/Sale.fodt +++ b/report/Sale.fodt @@ -1,10 +1,10 @@ - LibreOffice/7.3.7.2$Linux_X86_64 LibreOffice_project/30$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S + LibreOffice/7.3.7.2$Linux_X86_64 LibreOffice_project/30$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S - 26331 + 0 0 27077 12467 @@ -13,12 +13,12 @@ view2 - 8327 - 17776 + 18413 + 6255 0 - 26331 + 0 27076 - 38797 + 12465 0 0 false @@ -88,7 +88,7 @@ true true - 3065572 + 3088350 true false @@ -591,669 +591,696 @@ - - + - - + + + + + + - + - + - + - + + + + + - + - + + + + + - + - + - + - + + + + - + - + - + - + - + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - + + - - + + - - + + + - + + - - + + - + - + - + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + - + + + + + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + @@ -1412,7 +1439,7 @@ - + /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgK CgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkL EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAAR @@ -2074,7 +2101,7 @@ COTIZACIÓN ESTADO DE BORRADOR </when> <when test="sale.state == 'quotation'"> - COTIZACIÓN N°: <sale.number> + COTIZACIÓN N°: <sale.quote_number> </when> <otherwise test=""> ORDEN DE COMPRA N°: <sale.number> @@ -2106,41 +2133,43 @@ <for each="sale in records"> + <choose test=""> + <when test="sale.quote_number != None or sale.number != None"> - Fecha: <format_date(sale.sale_date or today, sale.party.lang)> + Fecha: <format_date(sale.sale_date or today, sale.party.lang)> - - - NIT: 901091201-1 - Regimen Común - Actividad Economica 4659 - CARRERA 16 No 52-85 PISO 4 - Tel: 601-7049417 - 3208197664 - BOGOTA + + + NIT: 901091201-1 + Regimen Común + Actividad Economica 4659 + CARRERA 16 No 52-85 PISO 4 + Tel: 601-7049417 - 3208197664 + BOGOTA - Cotizado a: <sale.party.name> - <if test="sale.party.tax_identifier"> - Nit o Cedula: <sale.party.tax_identifier.code> - </if> - Dirección: <sale.invoice_address.street> - Ciudad: <sale.invoice_address.subdivision_municipality.name> - Telefono: <sale.contact.value> + Cotizado a: <sale.party.name> + <if test="sale.party.tax_identifier"> + Nit o Cedula: <sale.party.tax_identifier.code> + </if> + Dirección: <sale.invoice_address.street> + Ciudad: <sale.invoice_address.subdivision_municipality.name> + Telefono: <sale.contact.value> - - Somos SMART VISION, la compañía que está revolucionando el mercado óptico en Colombia, ofrecemos productos y servicios ópticos con la mejor calidad y tecnología de punta. Nuestra mayor prioridad es satisfacer las necesidades de nuestros clientes - Agradecemos sinceramente el habernos elegido como opción; a continuación, relacionamos los productos solicitados. - " SMART VISION cambia tu forma de ver el mundo" + + Somos SMART VISION, la compañía que está revolucionando el mercado óptico en Colombia, ofrecemos productos y servicios ópticos con la mejor calidad y tecnología de punta. Nuestra mayor prioridad es satisfacer las necesidades de nuestros clientes + Agradecemos sinceramente el habernos elegido como opción; a continuación, relacionamos los productos solicitados. + " SMART VISION cambia tu forma de ver el mundo" @@ -2154,37 +2183,37 @@ - Descripción + Descripción - Modelo + Modelo - Marca + Marca - Origen + Origen - Garantia + Garantia - Cantidad + Cantidad - Precio u/n + Precio u/n - IVA + IVA - Total + Total - <for each="line in sale.lines"> + <for each="line in sale.lines"> @@ -2197,7 +2226,7 @@ - <choose test=""> + <choose test=""> @@ -2210,7 +2239,7 @@ - <when test="line.type == 'line'"> + <when test="line.type == 'line'"> @@ -2223,61 +2252,61 @@ - <if test="line.product"> - <line.product.rec_name> - </if> - <if test="line.description"> - <for each="description in line.description.split('\n')"> - <description> - </for> - </if> + <if test="line.product"> + <line.product.rec_name> + </if> + <if test="line.description"> + <for each="description in line.description.split('\n')"> + <description> + </for> + </if> - <if test="line.product"> - <if test="line.product.model_category"> - <line.product.model_category.name> - </if> - </if> + <if test="line.product"> + <if test="line.product.model_category"> + <line.product.model_category.name> + </if> + </if> - <if test="line.product"> - <if test="line.product.mark_category"> - <line.product.mark_category.name> - </if> - </if> + <if test="line.product"> + <if test="line.product.mark_category"> + <line.product.mark_category.name> + </if> + </if> - <if test="line.product"> - <if test="line.product.origin_country"> - <line.product.origin_country.name> - </if> - </if> + <if test="line.product"> + <if test="line.product.origin_country"> + <line.product.origin_country.name> + </if> + </if> - <if test="line.product"> - <if test="line.product.warranty"> - <line.product.warranty>Meses - </if> - </if> + <if test="line.product"> + <if test="line.product.warranty"> + <line.product.warranty>Meses + </if> + </if> - <format_number_symbol(line.quantity, sale.party.lang, line.unit, digits=line.unit.digits) if line.unit else format_number(line.quantity, sale.party.lang)> + <format_number_symbol(line.quantity, sale.party.lang, line.unit, digits=line.unit.digits) if line.unit else format_number(line.quantity, sale.party.lang)> - <format_currency(line.unit_price, sale.party.lang, sale.currency)> + <format_currency(line.unit_price, sale.party.lang, sale.currency)> - <for each="tax in line.taxes"> - <tax.description> - </for> + <for each="tax in line.taxes"> + <tax.description> + </for> - <format_currency(line.amount, sale.party.lang, sale.currency)> + <format_currency(line.amount, sale.party.lang, sale.currency)> - </when> + </when> @@ -2288,9 +2317,10 @@ + - <when test="line.type == 'subtotal'"> + <when test="line.type == 'subtotal'"> @@ -2303,10 +2333,10 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> - <format_currency(line.amount, sale.party.lang, sale.currency)> + <for each="description in (line.description or '').split('\n')"> + <description> + </for> + <format_currency(line.amount, sale.party.lang, sale.currency)> @@ -2319,7 +2349,7 @@ - </when> + </when> @@ -2332,7 +2362,7 @@ - <when test="line.type == 'title'"> + <when test="line.type == 'title'"> @@ -2345,9 +2375,9 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> + <for each="description in (line.description or '').split('\n')"> + <description> + </for> @@ -2360,7 +2390,7 @@ - </when> + </when> @@ -2373,7 +2403,7 @@ - <otherwise test=""> + <otherwise test=""> @@ -2386,9 +2416,9 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> + <for each="description in (line.description or '').split('\n')"> + <description> + </for> @@ -2440,7 +2470,7 @@ - Total antes Impuestos: + Total antes Impuestos: @@ -2448,14 +2478,14 @@ - <format_currency(sale.untaxed_amount, sale.party.lang, sale.currency)> + <format_currency(sale.untaxed_amount, sale.party.lang, sale.currency)> - Total impuestos: + Total impuestos: @@ -2463,15 +2493,14 @@ - <format_currency(sale.tax_amount, sale.party.lang, sale.currency)> + <format_currency(sale.tax_amount, sale.party.lang, sale.currency)> - - Total: + Total: @@ -2479,7 +2508,7 @@ - <format_currency(sale.total_amount, sale.party.lang, sale.currency)> + <format_currency(sale.total_amount, sale.party.lang, sale.currency)> @@ -2487,36 +2516,34 @@ <for each="comment in (sale.comment or '').split('\n')"> </for> - CONDICIONES DE NEGOCIACION Y PAGO: - Tiempo de entrega: <sale.description> - Forma de pago: <sale.payment_term.name if sale.payment_term else ""> - Medios de pago: - Efectivo, Consignación o transferencia a la cuenta corriente Bancolombia # 053813599-86 a nombre de SMART VISION SAS - DOCUMENTACIÓN ENTREGADA CON LOS EQUIPOS - - Factura - - Certificado de capacitación - - Manifiesto de importación (si aplica) - - Hoja de vida de cada equipo - - Certificado de calibración (Para equipos usados) - Otras condiciones: - - El costo del envío es responsabilidad del comprador (para otras ciudades diferentes a Bogotá). - - Garantía no incluye bombillos o piezas de desgaste por uso. - - Con el envío de los equipos se entregarán las hojas de vida. - - La Factura de venta definitiva será entregada al confirmar el pago total. - - OBSERVACIONES ADICIONALES - - <sale.comment> - - VIGENCIA DE LA COTIZACIÓN: 30 Días - </for> - Cordialmente + CONDICIONES DE NEGOCIACION Y PAGO: + Tiempo de entrega: <sale.description> + Forma de pago: <sale.payment_term.name if sale.payment_term else ""> + Medios de pago: + Efectivo, Consignación o transferencia a la cuenta corriente Bancolombia # 053813599-86 a nombre de SMART VISION SAS + DOCUMENTACIÓN ENTREGADA CON LOS EQUIPOS + - Factura + - Certificado de capacitación + - Manifiesto de importación (si aplica) + - Hoja de vida de cada equipo + - Certificado de calibración (Para equipos usados) + Otras condiciones: + - El costo del envío es responsabilidad del comprador (para otras ciudades diferentes a Bogotá). + - Garantía no incluye bombillos o piezas de desgaste por uso. + - Con el envío de los equipos se entregarán las hojas de vida. + - La Factura de venta definitiva será entregada al confirmar el pago total. + + OBSERVACIONES ADICIONALES + - <sale.comment> + + VIGENCIA DE LA COTIZACIÓN: 30 Días + Cordialmente - - + iVBORw0KGgoAAAANSUhEUgAABA4AAAI+CAYAAAA8dEjXAAKLKElEQVR4nOz9B4Bd13UeCn97 n3PvnV4ADHolwQawgypUBWXKsmRZcgMSx3qOXCIlTpzELY5f/j+Did9L3OTYUiyHcpEtK3YC qFik1QtAkaIosYoEwAIQvc8Mps9t55z91lp7n5kLYFBIAkRbH3lw5557et3ft9f6Vuycg0Kh @@ -5609,18 +5636,22 @@ - - - - JESUS ANTONIO GIRALDO GARCIA - C.E.O. (Gerente General) + + + + JESUS ANTONIO GIRALDO GARCIA + C.E.O. (Gerente General) - + - + </when> + </choose> + </for> + + \ No newline at end of file diff --git a/report/Sale_Internal.fodt b/report/Sale_Internal.fodt index 872c6bc..c464a46 100644 --- a/report/Sale_Internal.fodt +++ b/report/Sale_Internal.fodt @@ -1,28 +1,28 @@ - LibreOffice/7.3.7.2$Linux_X86_64 LibreOffice_project/30$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S + LibreOffice/7.3.7.2$Linux_X86_64 LibreOffice_project/30$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S - 27728 + 3969 0 - 24370 - 11208 + 31454 + 14058 true false view2 - 2191 - 11843 + 5733 + 12919 0 - 27728 - 24368 - 38934 + 3969 + 31452 + 18025 0 0 false - 200 + 160 false false false @@ -88,7 +88,7 @@ true true - 3288030 + 3502437 true false @@ -163,14 +163,14 @@ - + - + @@ -183,18 +183,18 @@ - + - + - + @@ -218,16 +218,16 @@ - - + + - - + + @@ -235,8 +235,8 @@ - - + + @@ -245,22 +245,22 @@ - + - + - + - + @@ -268,7 +268,7 @@ - + @@ -278,160 +278,160 @@ - + - + - + - + - + - + - + - + - + - + - + - - + + $ - + - $ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -507,7 +507,7 @@ - + @@ -530,713 +530,739 @@ - + + + + + - + - + + + + + - + - + + + + - + - + + + + - + - + - + - + - + - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + - - + + - - + + - - - + + + - - - + + + - + - + + + + + + + + + + + + + - + + + + + - - + + - - + + - - + + - - + + - + - + - - + + - - + + - - + + - - + + - + - + - - + + - + - + - - - - - - - - - - - - - - - - - - + + + - - - + + + - + + + + + + + + + + + + + + + + - - + + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - - + + - - + + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - - + + - - - - - - - - - - - - - - - - - + + - + + - - - + + - - - + + + - + + - - + + - - + + + - + + - - + + - + - + - + + + + + + + + + + + + + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - + - + - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + - + + + + + + + + + - - + + + + + + + + + + - - + + - - + + - - + + - + - + - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + - - + + - - - - + + + - - - - + + - - + + - + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - - + + - + - + - - + + - + - + - + - + - + - + + + + + + + + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - + + + + + + @@ -1358,23 +1384,26 @@ + + + - + - + - - + + - + - + @@ -1395,7 +1424,7 @@ - + /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgK CgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkL EBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAAR @@ -2057,7 +2086,7 @@ COTIZACIÓN ESTADO DE BORRADOR </when> <when test="sale.state == 'quotation'"> - COTIZACIÓN N°: <sale.number> + COTIZACIÓN N°: <sale.quote_number> </when> <otherwise test=""> ORDEN DE COMPRA N°: <sale.number> @@ -2089,41 +2118,43 @@ <for each="sale in records"> + <choose test=""> + <when test="sale.quote_number != None or sale.number != None"> - Fecha: <format_date(sale.sale_date or today, sale.party.lang)> + Fecha: <format_date(sale.sale_date or today, sale.party.lang)> - - - NIT: 901091201-1 - Regimen Común - Actividad Economica 4659 - CARRERA 16 No 52-85 PISO 4 - Tel: 601-7049417 - 3208197664 - BOGOTA + + + NIT: 901091201-1 + Regimen Común + Actividad Economica 4659 + CARRERA 16 No 52-85 PISO 4 + Tel: 601-7049417 - 3208197664 + BOGOTA - Cotizado a: <sale.party.name> - <if test="sale.party.tax_identifier"> - Nit o Cedula: <sale.party.tax_identifier.code> - </if> - Dirección: <sale.invoice_address.street> - Ciudad: <sale.invoice_address.subdivision_municipality.name> - Telefono: <sale.contact.value> + Cotizado a: <sale.party.name> + <if test="sale.party.tax_identifier"> + Nit o Cedula: <sale.party.tax_identifier.code> + </if> + Dirección: <sale.invoice_address.street> + Ciudad: <sale.invoice_address.subdivision_municipality.name> + Telefono: <sale.contact.value> - - Somos SMART VISION, la compañía que está revolucionando el mercado óptico en Colombia, ofrecemos productos y servicios ópticos con la mejor calidad y tecnología de punta. Nuestra mayor prioridad es satisfacer las necesidades de nuestros clientes - Agradecemos sinceramente el habernos elegido como opción; a continuación, relacionamos los productos solicitados. - " SMART VISION cambia tu forma de ver el mundo" + + Somos SMART VISION, la compañía que está revolucionando el mercado óptico en Colombia, ofrecemos productos y servicios ópticos con la mejor calidad y tecnología de punta. Nuestra mayor prioridad es satisfacer las necesidades de nuestros clientes + Agradecemos sinceramente el habernos elegido como opción; a continuación, relacionamos los productos solicitados. + " SMART VISION cambia tu forma de ver el mundo" @@ -2135,34 +2166,34 @@ - Descripción + Descripción - Modelo + Modelo - Marca + Marca - Origen + Origen - Garantia + Garantia - Cantidad + Cantidad - Precio u/n + Precio u/n - Total + Total - <for each="line in sale.lines"> + <for each="line in sale.lines"> @@ -2175,7 +2206,7 @@ - <choose test=""> + <choose test=""> @@ -2188,7 +2219,7 @@ - <when test="line.type == 'line'"> + <when test="line.type == 'line'"> @@ -2201,87 +2232,58 @@ - <if test="line.product"> - <line.product.rec_name> - </if> - <if test="line.description"> - <for each="description in line.description.split('\n')"> - <description> - </for> - </if> + <if test="line.product"> + <line.product.rec_name> + </if> + <if test="line.description"> + <for each="description in line.description.split('\n')"> + <description> + </for> + </if> - <if test="line.product"> - <if test="line.product.model_category"> - <line.product.model_category.name> - </if> - </if> + <if test="line.product"> + <if test="line.product.model_category"> + <line.product.model_category.name> + </if> + </if> - <if test="line.product"> - <if test="line.product.mark_category"> - <line.product.mark_category.name> - </if> - </if> + <if test="line.product"> + <if test="line.product.mark_category"> + <line.product.mark_category.name> + </if> + </if> - <if test="line.product"> - <if test="line.product.origin_country"> - <line.product.origin_country.name> - </if> - </if> + <if test="line.product"> + <if test="line.product.origin_country"> + <line.product.origin_country.name> + </if> + </if> - <if test="line.product"> - <if test="line.product.warranty"> - <line.product.warranty>Meses - </if> - </if> + <if test="line.product"> + <if test="line.product.warranty"> + <line.product.warranty>Meses + </if> + </if> - <format_number_symbol(line.quantity, sale.party.lang, line.unit, digits=line.unit.digits) if line.unit else format_number(line.quantity, sale.party.lang)> + <format_number_symbol(line.quantity, sale.party.lang, line.unit, digits=line.unit.digits) if line.unit else format_number(line.quantity, sale.party.lang)> - <format_currency(line.unit_price, sale.party.lang, sale.currency)> + <format_currency(line.unit_price, sale.party.lang, sale.currency)> - <format_currency(line.amount, sale.party.lang, sale.currency)> + <format_currency(line.amount, sale.party.lang, sale.currency)> - - - </when> - - - - - - - - - - - - - <when test="line.type == 'subtotal'"> - - - - - - - - - - - <for each="description in (line.description or '').split('\n')"> - <description> - </for> - <format_currency(line.amount, sale.party.lang, sale.currency)> + </when> @@ -2294,7 +2296,7 @@ - </when> + <when test="line.type == 'subtotal'"> @@ -2307,7 +2309,10 @@ - <when test="line.type == 'title'"> + <for each="description in (line.description or '').split('\n')"> + <description> + </for> + <format_currency(line.amount, sale.party.lang, sale.currency)> @@ -2320,7 +2325,7 @@ - </when> + </when> @@ -2333,7 +2338,7 @@ - <otherwise test=""> + <when test="line.type == 'title'"> @@ -2346,9 +2351,35 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> + </when> + + + + + + + + + + + + + <otherwise test=""> + + + + + + + + + + + + + <for each="description in (line.description or '').split('\n')"> + <description> + </for> @@ -2400,7 +2431,7 @@ - Total antes Impuestos: + Total antes Impuestos: @@ -2409,13 +2440,13 @@ - <format_currency(sale.untaxed_amount, sale.party.lang, sale.currency)> + <format_currency(sale.untaxed_amount, sale.party.lang, sale.currency)> - Total impuestos: + Total impuestos: @@ -2424,13 +2455,13 @@ - <format_currency(sale.tax_amount, sale.party.lang, sale.currency)> + <format_currency(sale.tax_amount, sale.party.lang, sale.currency)> - Total: + Total: @@ -2439,45 +2470,44 @@ - <format_currency(sale.total_amount, sale.party.lang, sale.currency)> + <format_currency(sale.total_amount, sale.party.lang, sale.currency)> - + <for each="comment in (sale.comment or '').split('\n')"> </for> - - CONDICIONES DE NEGOCIACION Y PAGO: - Tiempo de entrega: <sale.description> - Forma de pago: <sale.payment_term.name if sale.payment_term else ""> - Medios de pago: - Efectivo, Consignación o transferencia a la cuenta corriente Bancolombia # 053813599-86 a nombre de SMART VISION SAS - - DOCUMENTACIÓN ENTREGADA CON LOS EQUIPOS - - Factura - - Certificado de capacitación - - Manifiesto de importación (si aplica) - - Hoja de vida de cada equipo - - Certificado de calibración (Para equipos usados) - Otras condiciones: - - El costo del envío es responsabilidad del comprador (para otras ciudades diferentes a Bogotá). - - Garantía no incluye bombillos o piezas de desgaste por uso. - - Con el envío de los equipos se entregarán las hojas de vida. - - La Factura de venta definitiva será entregada al confirmar el pago total. - - OBSERVACIONES ADICIONALES - - <sale.comment> - - VIGENCIA DE LA COTIZACIÓN: 30 Días - </for> - Cordialmente + + CONDICIONES DE NEGOCIACION Y PAGO: + Tiempo de entrega: <sale.description> + Forma de pago: <sale.payment_term.name if sale.payment_term else ""> + Medios de pago: + Efectivo, Consignación o transferencia a la cuenta corriente Bancolombia # 053813599-86 a nombre de SMART VISION SAS + + DOCUMENTACIÓN ENTREGADA CON LOS EQUIPOS + - Factura + - Certificado de capacitación + - Manifiesto de importación (si aplica) + - Hoja de vida de cada equipo + - Certificado de calibración (Para equipos usados) + Otras condiciones: + - El costo del envío es responsabilidad del comprador (para otras ciudades diferentes a Bogotá). + - Garantía no incluye bombillos o piezas de desgaste por uso. + - Con el envío de los equipos se entregarán las hojas de vida. + - La Factura de venta definitiva será entregada al confirmar el pago total. + + OBSERVACIONES ADICIONALES + - <sale.comment> + + VIGENCIA DE LA COTIZACIÓN: 30 Días + Cordialmente - + iVBORw0KGgoAAAANSUhEUgAABA4AAAI+CAYAAAA8dEjXAAKLKElEQVR4nOz9B4Bd13UeCn97 n3PvnV4ADHolwQawgypUBWXKsmRZcgMSx3qOXCIlTpzELY5f/j+Did9L3OTYUiyHcpEtK3YC qFik1QtAkaIosYoEwAIQvc8Mps9t55z91lp7n5kLYFBIAkRbH3lw5557et3ft9f6Vuycg0Kh @@ -5570,18 +5600,21 @@ - - - - - JESUS ANTONIO GIRALDO GARCIA - C.E.O. (Gerente General) + + + + + JESUS ANTONIO GIRALDO GARCIA + C.E.O. (Gerente General) - + + </when> + </choose> + </for> diff --git a/sale.py b/sale.py index 6276ac6..09ca378 100644 --- a/sale.py +++ b/sale.py @@ -19,7 +19,7 @@ class Sale(metaclass=PoolMeta): 'Sale' __name__ = 'sale.sale' - + quote_number = fields.Char("Quote Number", readonly=True) sale_type = fields.Selection([('maintenance', 'Maintenance'), ('equipments', 'Equipments'), ('replaces', 'Replaces')], "Sale Type", required=True, @@ -112,14 +112,36 @@ class Sale(metaclass=PoolMeta): return Shipment(**values) + + @classmethod + def set_quote_number(cls, sales): + ''' + Fill the number field with the sale sequence + ''' + pool = Pool() + Config = pool.get('optical_equipment.configuration') + config = Config(1) + for sale in sales: + if config.equipment_sequence != None: + if not sale.quote_number: + try: + sale.quote_number = config.sale_quote_number.get() + cls.save(sales) + except UserError: + raise UserError(str('Validation Error')) + else: + raise UserError(gettext('optical_equipment.msg_not_sequence_quote')) + @classmethod @ModelView.button @Workflow.transition('quotation') def quote(cls, sales): pool = Pool() AdvancePaymentCondition = pool.get('sale.advance_payment.condition') - super(Sale, cls).quote(sales) - + for sale in sales: + sale.check_for_quotation() + cls.set_quote_number(sales) + for sale in sales: sale.set_advance_payment_term() cls.save(sales) @@ -156,7 +178,8 @@ class Sale(metaclass=PoolMeta): maintenanceService.save() sale.agended = True sale.save() - + + cls.set_number(sales) with transaction.set_context( queue_scheduled_at=config.sale_process_after, queue_batch=context.get('queue_batch', True)): diff --git a/sale.xml b/sale.xml index cf518a4..b32a34b 100644 --- a/sale.xml +++ b/sale.xml @@ -1,6 +1,11 @@ + + sale.sale + + sale_tree + sale.sale @@ -11,6 +16,10 @@ product_list_sale_line + + Sale Quote + + Sale Equipments sale.sale diff --git a/tryton.cfg b/tryton.cfg index 42816ab..faf31cb 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -20,6 +20,7 @@ depends: xml: address.xml party.xml + account.xml product.xml equipment.xml contract.xml diff --git a/view/optical_equipment_configuration_form.xml b/view/optical_equipment_configuration_form.xml index 91eeb02..75ea28e 100644 --- a/view/optical_equipment_configuration_form.xml +++ b/view/optical_equipment_configuration_form.xml @@ -16,6 +16,9 @@ this repository contains the full copyright notices and license terms. -->