将CSS代码添加到我的模块(ODOO 12)后出现错误

问题描述 投票:0回答:1

我在3个图像字段中存在我希望它们在同一行上的问题,因此我在模块目录中添加了一些CSS代码,如下所示:odoo / addons / GestionIMMO / static / src / scss / GestionIMMO.scss] >

这是我的GestionIMMO.scss代码:

.mmligne{text-align:right;}

这是我的gesimmo_views.xml代码

<odoo>
     <template id="assets_backend" name="GestionIMMO assets" inherit_id="web.assets_backend">
            <xpath expr="." position="inside">
                <link rel="stylesheet" href="/GestionIMMO/static/src/css/GestionIMMO.css"/>
            </xpath>
        </template>
    <record model="ir.ui.view" id="view_form_gesimmo">
      <field name="name">Product</field>
      <field name="model">product.template</field>
        <field name="inherit_id" ref="product.product_template_only_form_view"/>
      <field name="arch" type="xml">
          <xpath expr="//field[@name='default_code']" position="after">
              <group>
                <field name="prop" style="width:300%%"/>
                  <field name="ref" style="width:300%%"/>
                  <field name="surface" style="width:300%%"/>
                  <field name="immo_cat" style="width:300%%"/>
                  <field name="immo_titre" style="width:300%%"/>
                  <field name="immo_date" style="width:300%%"/>
                  <br/>
                  <br/>
                  <div class="mmligne">
                  <field name="img_one" widget="image" style="width:300%%"/>
                  <field name="img_two" widget="image" style="width:300%%"/>
                  <field name="img_three" widget="image" style="width:300%%"/>
                  </div>
              </group>
          </xpath>
          <xpath expr="//field[@name='standard_price']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
          <xpath expr="//field[@name='barcode']" position="attributes" nolabel="true">
            <attribute name="invisible">1</attribute>
        </xpath>
          <xpath expr="//field[@name='categ_id']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
           <xpath expr="//field[@name='type']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
          <xpath expr="//field[@name='default_code']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
          <xpath expr="//label[@for='standard_price']" position="attributes">
     <attribute name="invisible">1</attribute>
        </xpath>
          <xpath expr="//field[@name='taxes_id']" position="after">
              <group>
                <field name="nbre_ch" style="width:200%%"/>
                  <field name="pr" style="width:200%%"/>
                  <br />
                  <br />
                  <br />
                  <br />
                  <br />
                  <field name="rue" placeholder="Rue" style="width:200%%"/>
              <field name="gouv" placeholder="Gouvernorat" style="width:200%%"/>
              <field name="ville" placeholder="Ville" style="width:200%%"/>
              <field name="codepostal" placeholder="Code postal" style="width:200%%"/>
              <field name="pays" placeholder="Pays" style="width:200%%"/>
              </group>
          </xpath>
           <xpath expr="//field[@name='taxes_id']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
           <xpath expr="//field[@name='list_price']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
          <label for="name" position="replace">
                    <label for="name"  string="Nom du bien immobilier"/>
                </label>
          <label for="sale_ok" position="replace">
                    <label for="sale_ok"  string="A Vendre"/>
                </label>
          <label for="purchase_ok" position="replace">
                    <label for="purchase_ok"  string="A Louer"/>
                </label>
                <xpath expr="//field[@name='rue']" position="before">
                   <button name="open_map" string="Localisation sur Google Maps" type="object" class="oe_highlight" style="width:100%%"/>
                </xpath>
              <xpath expr="//page[@name='variants']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
           <xpath expr="//page[@name='sales']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
           <xpath expr="//page[@name='purchase']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
           <xpath expr="//page[@name='inventory']" position="attributes">
            <attribute name="invisible">1</attribute>
        </xpath>
          <!--<xpath expr="//button[@name='uom_name']" position="attributes">
            <attribute name="invisible">1</attribute>
          </xpath>-->
         <!-- <xpath expr="//page[@name='shop']" position="attributes">
            <attribute name="invisible">1</attribute>-->

            </field>
    </record>



</odoo>

我有这个错误:

 The style compilation failed, see the error below. Your recent actions may be the cause, please try reverting the changes you made.
Could not get content for /GestionIMMO/static/src/css/GestionIMMO.css defined in bundle 'web.assets_backend'.

ps:我继承了product_template视图

请帮助

我的3个图像字段在同一行上有问题,因此我在模块目录中添加了一些CSS代码,如下所示:odoo / addons / GestionIMMO / static / src / scss / GestionIMMO.scss这是。 ..

css xml odoo odoo-11 odoo-12
1个回答
0
投票

您已定义scss

© www.soinside.com 2019 - 2024. All rights reserved.