health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] Inheriting inherited views?


From: Luis Falcon
Subject: Re: [Health-dev] Inheriting inherited views?
Date: Mon, 4 Mar 2013 20:27:38 -0300

Hi there !

Try this sample. This will "hide" the socioeconomics page on the
patient notebook.

<!-- Just playing around -->

    <record model="ir.ui.view" id="gnuhealth_erase_socioeconomics_tab_demo">
            <field name="model">gnuhealth.patient</field>
            <field name="inherit" ref="health.gnuhealth_patient_view_form"/>
            <field name="arch" type="xml">
                <![CDATA[
                    <data>
                        <xpath
expr="/form/notebook/address@hidden'page_socioeconomics']"
                        position="replace"/>
                    </data>
                ]]>
            </field>
     </record>

Best


On Tue, Feb 26, 2013 at 12:26 PM, Hannah Sun <address@hidden> wrote:
> Hi!
> I also tried hiding the socioeconomics module with this code:
>
>     <record model="ir.ui.view" id="gnuhealth_patient_form_mycustomview">
>             <field name="model">gnuhealth.patient</field>
>             <field name="inherit" ref="health.gnuhealth_patient_view_form"/>
>             <field name="arch" type="xml">
>                 <![CDATA[
>                     <data>
>                         <xpath
>
> expr="/form/notebook/address@hidden&quot;page_socioeconomics&quot;]"
>                             position="replace_attributes">
> <page string="Socioeconomics" id="page_socioeconomics"
> states="{'invisible': True}"/>
>                         </xpath>
>                     </data>
>                 ]]>
>             </field>
>         </record>
> But I also have the same error that chrislene gets,    AttributeError:
> Couldn't find tag (xpath: /form/notebook/address@hidden"page_
> socioeconomics"]) in parent view
>
> It seems that it can't find the page (socioeconomics) in the parent view.
>
>
> On Sat, Feb 16, 2013 at 6:06 PM, Luis Falcon <address@hidden>
> wrote:
>>
>> Hi Chrislene
>>
>> On Fri, Feb 15, 2013 at 11:34 PM, Chrislene Legaspina
>> <address@hidden> wrote:
>> > Hi Luis
>> >
>> > I can't make it work because of this error: "Couldn't find tag (xpath:
>> > /form/notebook/address@hidden"page_socioeconomics"]) in parent view".
>> >
>> It should work. Did you inherit the view ? I just checked and it works
>> fine.
>>
>> > To answer your question, it is requested by the local hospital clinic
>> > doctor
>> > who we communicate with as client for this health information system
>> > project, that we should temporarily hide the socioeconomics tab along
>> > with
>> > other features. This is because most of the health clinic employees are
>> > computer illiterate and if ever the system is deployed to their clinic
>> > it
>> > may take a lot of time of getting used to. Once the employees have
>> > become
>> > familiar with the system, we could have these hidden features back.
>> If you don't have data in the system, then the best bet would be to do
>> an install without using the health_profile module, and choose only
>> the modules that you want/need at this stage.
>>
>> If you already have data, then the above solution (inheriting and
>> replacing the page in your own module's view will work).
>>
>> Regards,
>> >
>> > Regards,
>> > Chrislene
>> >
>> >
>> > On Sat, Feb 16, 2013 at 9:09 AM, Luis Falcon <address@hidden>
>> > wrote:
>> >>
>> >> Hello
>> >>
>> >> On Fri, Feb 15, 2013 at 9:36 AM, Chrislene Legaspina
>> >> <address@hidden> wrote:
>> >> > Hi
>> >> >
>> >> > I can't uninstall the socioeconomics module. It says that it depends
>> >> > on
>> >> > a
>> >> > currently installed module which is health. Is there a way where I
>> >> > can
>> >> > hide
>> >> > the socioeconomics tab by not uninstalling it?
>> >> >
>> >> Yes. As a general rule, __never__ uninstall a previously installed
>> >> module. It could break your current DB instance.
>> >>
>> >> > Also, I was referring to the socioeconomics xml view when I told you
>> >> > about
>> >> > the socioeconomics as a "custom" module because its xml view  is
>> >> > inherited
>> >> > from the xml view of health module. Sorry if I used the the wrong
>> >> > term
>> >> > and
>> >> > if I confused you.
>> >> To "erase" the tab (a tab is a notebook "page" in Tryton ), you can
>> >> replace the socioeconomics page
>> >>
>> >> Do something like this in your module view.
>> >>
>> >>                    <xpath
>> >> expr="/form/notebook/address@hidden'page_socioeconomics']"
>> >>                         position="replace"/>
>> >>
>> >> Let us know if it you got it working.
>> >>
>> >> Just out of curiosity, and probably for another thread.... why would
>> >> you want to get rid of the patient's socioeconomic information ? I
>> >> find socioeconmics a key element as a determinant of health.
>> >>
>> >> Best,
>> >>
>> >> >
>> >> > Regards,
>> >> >  Chrislene
>> >> >
>> >> >
>> >> > On Tue, Feb 12, 2013 at 10:37 AM, Luis Falcon
>> >> > <address@hidden>
>> >> > wrote:
>> >> >>
>> >> >> Hi Chrislene
>> >> >>
>> >> >> On Sun, Feb 10, 2013 at 10:46 AM, Chrislene Legaspina
>> >> >> <address@hidden> wrote:
>> >> >> > Hello,
>> >> >> >
>> >> >> > How can I hide the Socioeconomics tab in the Patient History? I am
>> >> >> > able
>> >> >> > to
>> >> >> > hide different views from the default module but since
>> >> >> > Socioeconomics
>> >> >> > is
>> >> >> > a
>> >> >> > "custom" module I'm at lost on how to hide its tab.
>> >> >> > Sorry for the very simple question. Thank you very much!
>> >> >> >
>> >> >> Socioeconomics is a module, so by not installing the socioeconomics
>> >> >> module, you should be OK.
>> >> >>
>> >> >> What do you mean by a "custom" module ?
>> >> >>
>> >> >> Best,
>> >> >> > Regards,
>> >> >> > Chrislene
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Luis Falcon
>> >> >> GNU Health
>> >> >> http://health.gnu.org
>> >> >>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Luis Falcon
>> >> GNU Health
>> >> http://health.gnu.org
>> >>
>> >
>>
>>
>>
>> --
>> Luis Falcon
>> GNU Health
>> http://health.gnu.org
>>
>



--
Luis Falcon
GNU Health
http://health.gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]