xml – Como Modificar y/o eliminar u Ocultar campos en el modulo de ventas de odoo13?

El caso es que necesito “Gestionar un almacen”, no obstante en la empresa no basta con instalar el modulo de inventario, ya que necesitan ” generarse solicitudes al inventario”

es una accion adicional, a mi se me ha ocurrido instalar el modulo de ventas ya que tiene “Pedidos” pero NO puedo dejar que se observen el coste, el Precio, el total, el iva y la cantidad disponible de productos en el formulario de solicitud

Soy algo nuevo utilizando y/o manipulando Odoo 13
Por favor si es necesario, expliquenme graficamente o paso a paso… les agradezco un monton!
Aqui se observa el formulario de la vista, pero no sé como quitar estos campos que les menciono

Modify shared_prefs XML file from adb shell

My Tolino Vision 4 HD e-book reader has no vi, vim.tiny or any other text editor executable, so to edit files I have to “adb pull” it to my PC, modify it there and “adb push” it back.
This takes too long for quick tinkering. “adb push” also sets new user+group to the file (root:root) instead of the original permissions.

Is there an in-built cli tool to modify application shared_prefs XML files while inside adb shell? (Add a new property and value, modify existing property’s value, delete property)


I already patched adb to allow root access, so permissions are not a problem. I’m just asking for a convenience tool.

8 – How do I debug/kint Simple XML Sitemap link array?

I am trying to find how I can debug/kint a variable/array from the Simple XML Sitemap?

I worked through the documentation here: https://www.drupal.org/docs/8/modules/simple-xml-sitemap/api-and-extending-the-module#s-api-hooks to find the hook I need.

My goal is to unset any links that have node/ to remove published, but un-aliased nodes of included content types.

The array key ('path') looks to be the unaliased URL and the below code removes all links except the home page. I am unsure how I can kint($link) in this function so I can see what other array keys are available to see what else I may use for comparison.

function HOOK_simple_sitemap_links_alter(array &$links, $sitemap_variant) {

  foreach ($links as $key => $link) {
    if (strpos($link('meta')('path'), 'node/') !== FALSE) {
      unset($links($key));
    }
  }
}

Is there a way to kint() these sitemap arrays? Or maybe some documentation that shows the structure of these arrays?

XML transformation with XSLT data before tags

I’m trying to apply a transformation to a payload but the result has some loose values, what am I doing wrong?

At first I had problemas with the original namespace and doing some research found out I had to declare it, but now this happens and I don’t understand it.
I go matching pbc:operaciones so I can process data from that array, why does it show the other values?

XML input:

<?xml version='1.0' encoding='utf-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <PbcWsGetOperacionesResponse xmlns="http://ddpbc.cbc.es">
            <estado>
                <estado>OK</estado>
            </estado>
            <numeroOperaciones>67</numeroOperaciones>
            <operaciones>
                <operacion>
                    <codigoOperacion>E007O000121</codigoOperacion>
                    <codigoPromocion>E007P0007</codigoPromocion>
                    <nombrePromocion>101 - Altos de Los Fresnos</nombrePromocion>
                    <codigoCliente/>
                    <identificacionCliente>10011242M</identificacionCliente>
                    <cliente>JUAN LOPEZ</cliente>
                    <inmueble/>
                    <estado>2</estado>
                    <conclusion>5</conclusion>
                    <fechaConclusion>2020-08-27T11:39:51+02:00</fechaConclusion>
                    <numeroIntervinientes>1</numeroIntervinientes>
                </operacion>
                <operacion>
                    <codigoOperacion>E007O000122</codigoOperacion>
                    <codigoPromocion>E007P0007</codigoPromocion>
                    <nombrePromocion>101 - Altos de Los Fresnos</nombrePromocion>
                    <codigoCliente/>
                    <identificacionCliente>10011242M</identificacionCliente>
                    <cliente>JUAN LOPEZ</cliente>
                    <inmueble/>
                    <estado>2</estado>
                    <conclusion>5</conclusion>
                    <fechaConclusion>2020-08-27T11:40:02+02:00</fechaConclusion>
                    <numeroIntervinientes>1</numeroIntervinientes>
                </operacion>
            </operaciones>
        </PbcWsGetOperacionesResponse>
    </soap:Body>
</soap:Envelope>

XSLT

<xsl:stylesheet version="1.0" xmlns:pbc="http://ddpbc.cbc.es" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:b="http://ws.wso2.org/dataservice" xmlns:xslFormatting="urn:xslFormatting">
    <xsl:template match="pbc:operaciones">
        <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style">
            <soap:Body>
                <urn:ZacCreaExpedientesFromWs>
                    <ItExpeout>
                        <xsl:for-each select="pbc:operacion">
                            <item>
                                <Expedien>
                                    <xsl:value-of select="pbc:codigoOperacion"/>
                                </Expedien>
                                <Status>
                                    <xsl:value-of select="pbc:conclusion"/>
                                </Status>
                                <Fexpedient>
                                    <xsl:value-of select="pbc:fechaConclusion"/>
                                </Fexpedient>
                            </item>
                        </xsl:for-each>
                    </ItExpeout>
                </urn:ZacCreaExpedientesFromWs>
            </soap:Body>
        </soap:Envelope>
    </xsl:template>
</xsl:stylesheet>

Result:

<?xml version="1.0" encoding="UTF-8"?>
    
        
            
                OK
            
            67
            <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:pbc="http://ddpbc.cbc.es" xmlns:b="http://ws.wso2.org/dataservice" xmlns:xslFormatting="urn:xslFormatting"><soap:Body><urn:ZacCreaExpedientesFromWs><ItExpeout><item><Expedien>E007O000121</Expedien><Status>5</Status><Fexpedient>2020-08-27T11:39:51+02:00</Fexpedient></item><item><Expedien>E007O000122</Expedien><Status>5</Status><Fexpedient>2020-08-27T11:40:02+02:00</Fexpedient></item></ItExpeout></urn:ZacCreaExpedientesFromWs></soap:Body></soap:Envelope>
        
    

Thanks!

Buscar elemento por atributo, en DOM XML, con Javascript

Quisiera saber como buscar un elemento dentro un archivo XML, pero filtrando por el valor de uno de sus atributos.

Este es el archivo:

<Response state="finalize">
    <Result name="xmlDataManager" type="string">_l_?xml version=_dq_1.0_dq_ encoding=_dq_utf-8_dq_ ?_g__l_Data_g__l_row detailId=_dq_176606_dq_ date=_dq_2020-03-01T00:00:00_dq_ stationId=_dq_348_dq_ employeeId=_dq_9507_dq_ shiftId=_dq_2_dq_ employee=_dq_7880_dq_ name=_dq_ELIZABETH MARTINEZ PLASCENCIA_dq_/_g__l_row detailId=_dq_176607_dq_ date=_dq_2020-03-01T00:00:00_dq_ stationId=_dq_348_dq_ employeeId=_dq_6982_dq_ shiftId=_dq_3_dq_ employee=_dq_5671_dq_ name=_dq_CINTHYA ANGELICA RIOS CALVILLO_dq_/_g__l_/Data_g_</Result>
    <Result name="emptyTemplate" type="string">1</Result>
    <Result name="xmlData" type="string">_l_?xml version=_dq_1.0_dq_ encoding=_dq_utf-8_dq_ ?_g__l_Data_g__l_row detailId=_dq_348125_dq_ shiftId=_dq_1_dq_ employeeId=_dq_28182_dq_ employee=_dq_13489_dq_ name=_dq_ANA ISABEL DIAZ GRACIAN_dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_row detailId=_dq_348120_dq_ shiftId=_dq_1_dq_ employeeId=_dq_896_dq_ employee=_dq_4308_dq_ name=_dq_AMADOR BAUTISTA REYES_dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_row detailId=_dq_348121_dq_ shiftId=_dq_2_dq_ employeeId=_dq_11876_dq_ employee=_dq_10218_dq_ name=_dq_ADRIAN ALEJANDRO RAMIREZ RAMIREZ_dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_row detailId=_dq_348122_dq_ shiftId=_dq_2_dq_ employeeId=_dq_16758_dq_ employee=_dq_12085_dq_ name=_dq_JANET PALACIOS MALDONADO_dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_row detailId=_dq_348123_dq_ shiftId=_dq_2_dq_ employeeId=_dq_33089_dq_ employee=_dq_14374_dq_ name=_dq_MARIA GUADALUPE MEDINA DIMAS _dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_row detailId=_dq_348124_dq_ shiftId=_dq_3_dq_ employeeId=_dq_16039_dq_ employee=_dq_11372_dq_ name=_dq_LIZETH YOLANDA LUGO HERNANDEZ_dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_row detailId=_dq_348126_dq_ shiftId=_dq_3_dq_ employeeId=_dq_34550_dq_ employee=_dq_14827_dq_ name=_dq_BRENDA YANETH BELTRAN CUEVAS_dq_ restCover=_dq_0_dq_ vacationDays=_dq_0_dq_ goalDays=_dq_0_dq_ oilsGoal=_dq_0_dq_ litersGoal=_dq_0_dq_/_g__l_/Data_g_</Result>
</Response>

Necesito obtener:

<Result name="xmlDataManager" type="string">_l_?xml version=_dq_1.0_dq_ encoding=_dq_utf-8_dq_ ?_g__l_Data_g__l_row detailId=_dq_176606_dq_ date=_dq_2020-03-01T00:00:00_dq_ stationId=_dq_348_dq_ employeeId=_dq_9507_dq_ shiftId=_dq_2_dq_ employee=_dq_7880_dq_ name=_dq_ELIZABETH MARTINEZ PLASCENCIA_dq_/_g__l_row detailId=_dq_176607_dq_ date=_dq_2020-03-01T00:00:00_dq_ stationId=_dq_348_dq_ employeeId=_dq_6982_dq_ shiftId=_dq_3_dq_ employee=_dq_5671_dq_ name=_dq_CINTHYA ANGELICA RIOS CALVILLO_dq_/_g__l_/Data_g_</Result>"

Lo he logrado con m_XmlResponse.querySelector("Response Result(name='xmlDataManager')")

Pero Internet Explorer no es compatible con querySelector(), y necesito que funcione en Chrome e IE.
Además de que debe ser con Javascript y no con JQuery.

Gracias

"Android XML element is not allowed here"

I am getting error below, I was told I needed this line, however I get this error and not sure how to fix it since I am not sure what it means. New to programming especially in android setting.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.volley">
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <uses-library android:name="org.apache.http.legacy" android:required="false"></uses-library> //Error on this line...
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

xml – Bottom Sheet Android [peekHeight] no funciona en Android 6

Talvez es un error muy tonto, pero no encuentro una solución.
Tengo un activity con un Mapa y quiero mostrar un BottomSheet que no se esconda por completo. Lo tengo asi…

MyActivity.xml

<androidx.coordinatorlayout.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:mapbox="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

<com.mapbox.mapboxsdk.maps.MapView
    android:id="@+id/mapView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    mapbox:mapbox_cameraZoom="12" />

<include layout="@layout/bottom_sheet" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

bottom_sheet.xml

<androidx.constraintlayout.widget.ConstraintLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="#FFFFFF"
    android:padding="16dp"
    app:behavior_hideable="false"
    app:behavior_peekHeight="70dp"
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

<TextView
    android:id="@+id/textView24"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="UNO"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />

    ...
    ...
    <TextView...
    ...
</androidx.constraintlayout.widget.ConstraintLayout>

Se vé perfecto en Android 8.0

Pero en Android 6.0 no se expande por completo el layout.

No sé si tengo que agregar otra propiedad al XML o simplemente la opción peekHeight no se muestra bien en todas las versiones dfe Android. Gracias por su ayuda. :]

php – Pegar valor de um objeto gerado por xml

Tenho esse script que faço uma requisicao e vem xml e depois transformo no objeto $xml.

  $xml = simplexml_load_string($retorno);

  {"date":"2020-09-20T15:52:05.000-03:00","code":"653BCF4D-458A-4139-8C61-D61406CF2313",
    "reference":"133","type":"1","status":"1","lastEventDate":"2020-09-20T15:52:07.000-03:00",
   "paymentMethod":{"type":"2","code":"202"},

eu gostaria de pegar os valores que estão nos campos se eu colocar uma variavel

  $variavel = $xml->code.

ate consigo pegar o valor porem ele sai assim {0 : 653BCF4D-458A-4139-8C61-D61406CF2313},
como faria pra pegar os valores dentro do $xml sem aparecer o 0:
ja fiz foreach

foreach($xml as $key => $value) {
     $inserir($key) = $value;
 }

XML Config file for SharePoint Designer 2013

Good Morning,
I need help with configuring an xml config file for Sharepoint Designer 2013. specifically, I’m looking for a way to disable the start options screen (regarding updates) so end users do not have to see it. This is an SCCM2012 install to a citrix environment. We’ve tried the following reg hacks, but it does not work for all users:

User Configuration – HKCUSoftwareMicrosoftOffice15.0FirstRun Value Name: BootedRTM Value Type: REG_DWORD Value Data: 1
User Configuration – HKCUSoftwareMicrosoftOffice15.0CommonGeneral Value Name: ShownFirstRunOptin Value Type: REG_DWORD Value Data: 1

I’m hoping to incorporate the above lines into my xml file (once we get them working) for my deployment. XML file below:

Java, dealing with XML and JPA Annotated Classes

I use xjc to compile XSD files to Java Classes, and want to edit/extend them to make them persistable through JPA.

I cant figure out what the best “Coupling?” would be and how to organize it, if I modify the xjc compiled Classes to be persistable, I would lose the Ability to recompile the XSD if there are any changes.

Even if I didn’t need to recompile, in some cases, I still wouldn’t be able to serialize/deserialize Data that was collected before my Schema changed.

I don’t want to completely “decouple”, since I want to keep the ability to Persist the imported XML Object with just a few lines of code (not having to write a sort of “converter” for each XML Entity).

Has anyone been faced with the same issue? How did you manage to solve it.