diff --git a/locale/es.po b/locale/es.po index e39381b..43cbf41 100644 --- a/locale/es.po +++ b/locale/es.po @@ -726,6 +726,10 @@ msgctxt "field:sale.sale,quote_number:" msgid "Quote Number" msgstr "Cotización #" +msgctxt "field:sale.sale,payment_term_description:" +msgid "Payment Term" +msgstr "Plazo de Pago" + msgctxt "field:sale.sale,description:sale." msgid "Description" msgstr "Tiempo de Entrega" diff --git a/report/Sale.fodt b/report/Sale.fodt index e8a5e50..959fe37 100644 --- a/report/Sale.fodt +++ b/report/Sale.fodt @@ -1,31 +1,30 @@ - LibreOffice/7.4.6.2$Linux_X86_64 LibreOffice_project/40$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S + LibreOffice/7.4.7.2$Linux_X86_64 LibreOffice_project/40$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S - 0 + 68703 0 - 40836 - 18302 + 30628 + 13744 true false view2 - 14041 - 17293 + 5383 + 77264 0 - 0 - 40834 - 18300 + 68703 + 30626 + 82446 0 0 false - 120 + 160 false false - false false @@ -91,7 +90,7 @@ true true - 3302014 + 3302942 true false @@ -168,7 +167,7 @@ - + @@ -327,16 +326,16 @@ - + $ - + - $ - + @@ -652,192 +651,192 @@ - + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - - - - - - - - - + - + - - + + - + - - - - - + - + + + + + @@ -1696,45 +1695,45 @@ <for each="sale in records"> - <choose test=""> + <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)> - <if test="sale.company"> - <sale.company and sale.company.rec_name> + <if test="sale.company"> + <sale.company and sale.company.rec_name> NIT: <sale.company.party.identifiers[0].code> Regimen Común Actividad Economica 4659 - Dirección: <sale.company.party.addresses[0].street><sale.company.party.addresses[0].city> - Teléfono: <sale.company.party.phone> - Celular: <sale.company.party.mobile> - E-mail: <sale.company.party.email> - </if> + Dirección: <sale.company.party.addresses[0].street><sale.company.party.addresses[0].city> + Teléfono: <sale.company.party.phone> + Celular: <sale.company.party.mobile> + E-mail: <sale.company.party.email> + </if> - 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" @@ -1748,37 +1747,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"> @@ -1791,7 +1790,7 @@ - <choose test=""> + <choose test=""> @@ -1804,7 +1803,7 @@ - <when test="line.type == 'line'"> + <when test="line.type == 'line'"> @@ -1817,61 +1816,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 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 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 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 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> @@ -1884,7 +1883,7 @@ - <when test="line.type == 'subtotal'"> + <when test="line.type == 'subtotal'"> @@ -1897,10 +1896,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)> @@ -1913,7 +1912,7 @@ - </when> + </when> @@ -1926,7 +1925,7 @@ - <when test="line.type == 'title'"> + <when test="line.type == 'title'"> @@ -1939,9 +1938,9 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> + <for each="description in (line.description or '').split('\n')"> + <description> + </for> @@ -1954,7 +1953,7 @@ - </when> + </when> @@ -1967,7 +1966,7 @@ - <otherwise test=""> + <otherwise test=""> @@ -1980,9 +1979,9 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> + <for each="description in (line.description or '').split('\n')"> + <description> + </for> @@ -2080,28 +2079,29 @@ <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 - Cordialmente + CONDICIONES DE NEGOCIACION Y PAGO: + Tiempo de entrega: <sale.description> + Forma de pago: + <sale.payment_term_description if sale.payment_term_description 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 @@ -5211,8 +5211,8 @@ - </when> - </choose> + </when> + </choose> </for> diff --git a/report/Sale_Internal.fodt b/report/Sale_Internal.fodt index 2a975dc..2008cb9 100644 --- a/report/Sale_Internal.fodt +++ b/report/Sale_Internal.fodt @@ -1,31 +1,30 @@ - LibreOffice/7.4.6.2$Linux_X86_64 LibreOffice_project/40$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S + LibreOffice/7.4.7.2$Linux_X86_64 LibreOffice_project/40$Build-22008-06-07T15:28:222009-01-10T16:03:331PT0S - 0 + 66146 0 30628 - 13727 + 13744 true false view2 - 6124 - 45549 + 5320 + 72900 0 - 0 + 66146 30626 - 13725 + 79888 0 0 false 160 false false - false false @@ -91,7 +90,7 @@ true true - 3665174 + 3670938 true false @@ -169,7 +168,7 @@ - + @@ -320,16 +319,16 @@ - + $ - + - $ - + @@ -670,654 +669,651 @@ - + + + + + + + + + - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - + - + + + + + + + + + - + - + - + - - - - - - - - - + + + + + + + + + - + - + - + - + - + - + - + - + - + - - - - - - - - + - + + + + + + + + - + - + - + - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + - - + + - + - + - + - + - + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - + + + + + + + + + + + - + - + - + - + - - - - - - - - - + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - + - - - - - - - - - + - + - + - - - - - - + + + @@ -2202,37 +2198,37 @@ - Fecha: <format_date(sale.sale_date or today, sale.party.lang)> + Fecha: <format_date(sale.sale_date or today, sale.party.lang)> - <if test="sale.company"> - <sale.company and sale.company.rec_name> + <if test="sale.company"> + <sale.company and sale.company.rec_name> NIT: <sale.company.party.identifiers[0].code> Regimen Común Actividad Economica 4659 - Dirección: <sale.company.party.addresses[0].street><sale.company.party.addresses[0].city> - Teléfono: <sale.company.party.phone> - Celular: <sale.company.party.mobile> - </if> + Dirección: <sale.company.party.addresses[0].street><sale.company.party.addresses[0].city> + Teléfono: <sale.company.party.phone> + Celular: <sale.company.party.mobile> + </if> - 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" @@ -2244,34 +2240,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"> @@ -2284,7 +2280,7 @@ - <choose test=""> + <choose test=""> @@ -2297,7 +2293,7 @@ - <when test="line.type == 'line'"> + <when test="line.type == 'line'"> @@ -2310,57 +2306,57 @@ - <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> @@ -2373,7 +2369,7 @@ - <when test="line.type == 'subtotal'"> + <when test="line.type == 'subtotal'"> @@ -2386,36 +2382,10 @@ - <for each="description in (line.description or '').split('\n')"> - <description> - </for> - <format_currency(line.amount, sale.party.lang, sale.currency)> - - - - - - - - - - - - - </when> - - - - - - - - - - - - - <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)> @@ -2441,7 +2411,7 @@ - <otherwise test=""> + <when test="line.type == 'title'"> @@ -2454,9 +2424,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> @@ -2553,31 +2549,32 @@ - + <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 + CONDICIONES DE NEGOCIACION Y PAGO: + Tiempo de entrega: <sale.description> + Forma de pago: + <sale.payment_term_description if sale.payment_term_description 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 @@ -5680,8 +5677,8 @@ - - JESUS ANTONIO GIRALDO GARCIA + + JESUS ANTONIO GIRALDO GARCIA C.E.O. (Gerente General) @@ -5689,8 +5686,8 @@ - </when> - </choose> + </when> + </choose> </for> diff --git a/sale.py b/sale.py index 2981b89..376977e 100644 --- a/sale.py +++ b/sale.py @@ -43,17 +43,18 @@ class Sale(metaclass=PoolMeta): search_context={ 'related_party': Eval('party'), },) - agended = fields.Boolean("Scheduling",states={ - 'invisible': (Eval('sale_type') != 'maintenance'),}) + agended = fields.Boolean("Scheduling", states={ + 'invisible': (Eval('sale_type') != 'maintenance')}) + payment_term_description = fields.Char("Payment Term", states={ + 'readonly': Eval('state') != 'draft', + }, depends=['state']) - @classmethod def __setup__(cls): super(Sale, cls).__setup__() - cls.contact.states['required']=True - cls.description.states['required']=True - cls.sale_date.states['required']=True - cls.payment_term.states['required']=True + cls.contact.states['required'] = True + cls.description.states['required'] = True + cls.sale_date.states['required'] = True cls._buttons.update({ 'draft': { 'invisible': (Eval('state').in_( @@ -167,11 +168,11 @@ class Sale(metaclass=PoolMeta): 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) - + @classmethod @ModelView.button_action( 'optical_equipment.wizard_confirm_sale_date') @@ -203,23 +204,23 @@ class Sale(metaclass=PoolMeta): ) maintenanceService.save() sale.agended = True - sale.state="confirmed" + sale.state = "confirmed" sale.save() - cls.set_number([sale]) + cls.set_number([sale]) with Transaction().set_context( queue_name='sale', queue_scheduled_at=config.sale_process_after): cls.__queue__.process(sales) - + class SaleLine(metaclass=PoolMeta): 'SaleLine' __name__ = 'sale.line' product_equipment = fields.Boolean("Product Equipment") unit_digits = fields.Function(fields.Integer('Unit Digits'), - 'on_change_with_unit_digits') + 'on_change_with_unit_digits') @classmethod diff --git a/view/sale_form.xml b/view/sale_form.xml index cb91e9d..a04b72e 100644 --- a/view/sale_form.xml +++ b/view/sale_form.xml @@ -2,6 +2,13 @@ + + + +